I've created an user control and added it to a form and en开发者_运维技巧abled Auto Scroll property (True).
When I resize the form, this user control horizontal scrollbar still remains the same width and does not change its length, due to which I am not able to see the user control contents when the form size is changed or the user control size is changed.
Can anyone assist me in this on how to make the horizontal scrollbar works as expected: like when the form resizes, the horizontal scrollbar allows the user to see the contents of user control (which is the default beaviour).
The Auto Scroll property(True) is a form property.
It effects the behavior of the form in a case where you have controls outside the form visible area, it behaves like this:
if Auto Scroll = true -> then you will have scrollbars in the form so you will be able to scroll to the unvisible controls or part of controls
If Auto Scorll = false -> then scollbars wont be added to the form in any case, and the controls will remain unvisible.
If you have content inside a control that is not visible, try changing the control's properties "Scrollable" to "true" or "Scrollbars" to "both", Depends on the control's type.
精彩评论