I have a user condrol that may have several instances created and I am looking for the best option to handle the displaying and scrolling on my winform. in the past I have simply displayed them in a panel and scrolled the panel, but I thought this time around I would li开发者_JAVA技巧ke to try something different.
any sugestions would be welcome.
Thanks
Yes, that's pretty inefficient. A UserControl derives from ScrollableControl, just like Panel. So it is capable of displaying scrollbars and scroll its content, like like Panel. Set its AutoScroll property to true, set AutoScrollMinSize if necessary.
Hard to be sure with-out knowing more about your usercontrol;
Can you display the data in a List box or Grid control?
精彩评论