Hi,
I'm currently encounterring a little problem with UltraGridBagLayoutPanel.
I have set my GridBagLayoutPanel with AutoScroll Off and AutoSize False. I have for controls in this panel, and three of them are UserControls.
I've tried every property I found dealing with Sizing and Scrollable, but no way to make inner controls scrollable when their size is too small after downsizing the whole form.
I would like the elements of the panel to be scrollable when I downsize the form.
My usercontrols are set on AutoSize False, AutoScroll True ...
Please help !
Thank you for your answer, so is there any possibility ro create resizable usercontrols ?
lepierrot said:At creation, my usercontrol is set on AutoScroll On (at this step I haven't added anything else yet). Then I add an UltraGroupBox which I set the Dock property on Fill. After that, I add multiple TextEditors, labels and buttons in this group Box. Still it doesn't work. Is there a problem coming from the fact that I've set the GroupBox on Fill ?
Yes, that's a problem. Setting the Panel to AutoScroll means that the contents of the panel will scroll if they go outside the bounds of the control. But the contents of the panel consist of only one control and if that control is docked, then it will never go outside the bounds of the panel and therefore never scroll.
Thanks a lot for your answer.
At creation, my usercontrol is set on AutoScroll On (at this step I haven't added anything else yet). Then I add an UltraGroupBox which I set the Dock property on Fill. After that, I add multiple TextEditors, labels and buttons in this group Box. Still it doesn't work. Is there a problem coming from the fact that I've set the GroupBox on Fill ?
But it doesn't seem to be the problem because even when I add a simple component (not one of my userforms) on the empty space under the ribbon, and set this component to autoscroll, Scrollbars doesn't appear when I make the form smaller ..
PS: I don't know if it has something to do with my problem, but I'm working with the Office 2007 Ribbon, and the GridBagLayoutPanel is the empty space of the work which is not filled by the ribbon.
I'm afraid I do not understand what you mean. Are you talking about scrolling the GridBagLayoutPanel? Or scrolling your UserControl?
If it's the GridBagLayoutPanel, then obviously you would not want to turn off AutoScroll.
If it's the UserControl, then the GridBagLayoutPanel really has nothing do with it. The GridBagLayoutPanel will position and size the controls within it, but it doesn't have any control over the scrolling. Usually, if a control has AutoScroll set and one of it's child controls is outside the viewable area, it will turn on it's scrollbars. If that's not happening, then something is wrong on the UserControl. If you place your UserControl on the form and make it smaller, does it scroll? It does not make any difference what the UserControl is contained by, only it's size and it's contents matters.