[英]how to scroll a both richTextbox and Panel with a custom Vscrollbar C#?
i am trying to scroll up and down both RTB and Panel with a single VscrollBar, i have textbox which is loaded with a text file and a panel which is loaded with the labels both textbox and panel should scroll with a single scrollbar i have searching around all over the internet but could not find any solution. 我试图用单个VscrollBar上下滚动RTB和面板,我有一个装有文本文件的文本框,一个装有标签的面板,文本框和面板都应该用一个滚动条滚动,我一直在搜索遍及整个互联网,但找不到任何解决方案。
figure is shown here 如图所示
assuming you are working on WPF you can encapsulate your items into an scrollViewer: 假设您正在使用WPF,可以将项目封装到scrollViewer中:
<ScrollViewer VerticalScrollBarVisibility="Auto">
<your RTB>
<your labels>
</ScrollViewer>
I guess for WinForm you have something similar 我猜对于WinForm,您有类似的东西
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.