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 !
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.
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.
lepierrot said:No what I meant here is that I filled each user control with a GroupBox, ok it was not very clear, I give it to you!
That was perfectly clear. :)
lepierrot said: Anyway, thank you for your tip because it actually worked very well! I've added a panel which filled each group box of each UserControl (GroupBox is filled to the UserControl too), and put this panel on Scrollable. It works ! You rock !
Anyway, thank you for your tip because it actually worked very well! I've added a panel which filled each group box of each UserControl (GroupBox is filled to the UserControl too), and put this panel on Scrollable. It works !
You rock !
Glad you got it working.
Mike Saltzman"]I think this might be where the confusion is. A GroupBox is not a UserControl. What you have here is a GroupBox in a UserControl.
No what I meant here is that I filled each user control with a GroupBox, ok it was not very clear, I give it to you!
Hi Peirre,
lepierrot said:Each GroupBox is a UserControl,
I think this might be where the confusion is. A GroupBox is not a UserControl. What you have here is a GroupBox in a UserControl.
I think what you want to happen here is that the controls inside the GroupBox are are in a scrollable area. But those control are not in the UserControl directly, they are in the GroupBox. So setting the UserControl to scrollable will have no effect. You need to put those controls into a scrollable container directly. So it sounds to me like maybe you need to fill the GroupBox with a scrollable panel control and put your controls inside the panel rather that directly into the GroupBox.
I think there definitely something I don't understand !
Here is my application:
And the free space under the ribbon is filled with a GridBagLayoutPanel.
Each GroupBox is a UserControl, except the CreateAccount Button.
The application, as it is displayed here, is in its normal size, there is nothing to notice.
Below is an example when I make the form shorter:
Here you can obviously see that my GroupBoxes (user control finally) are overlapping. I would like scrollbars to appear in each in order to keep displaying the entire information.
Or maybe this much more simple to prevent user from down-sizing under a certain size?
Thank you for your time anyway.
PS: When I downsize more again, event the ribbon is hidden by the panel..
Pierre
I'm afraid you lost me. You mean scrollable user controls?
Yes, of course you can create a scrollable user control. But you can't then fill that control with another control. The scrollable control has to contain a controls that are, or at least can be, outside it's own bounds.
By the way, none of this is relate to the WinGridBagLayoutPanel. You might want to check out Microsoft's documentation ofr forums. Perhaps that have some samples or tutorials on this that you can use.