简体   繁体   中英

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.
figure is shown here

assuming you are working on WPF you can encapsulate your items into an scrollViewer:

<ScrollViewer VerticalScrollBarVisibility="Auto">
    <your RTB>
    <your labels>
</ScrollViewer>

I guess for WinForm you have something similar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM