I am using a WinDockManager to separate areas on my Winforms. Basic layout is an WinExplorerBar on the left side (Vertical split bar), an UltraGrid on the right(Horizontal split bar), and some buttons below the Ultragrid. The WinExplorerBar occupies the first 'column' of the form, the Ultragrid occupies the second 'column' and is setup to dock to the top, and occupy the remaining horizontal space, with the bottom split bar set close to the bottom of the window, leaving enough room for the buttons I place there. Works as expected, when I unpin the WinExplorerBar, it hides to a tab on the left, and the grid expands to occupy the complete width of the form, and when repinning the WinExplorer bar, the grid resizes horizontally to occupy the remaing space...great. The problem is that if the Window is resized the splitter bar at the bottom of the grid does not remain in the same proximity to the bottom of the widow. To clarify if I have a button anchored to the bottom right of the form, the button stays in the same relative spot to the bottom of the window, but the horizontal splitter bar moves farther away, if the window is expanded downward, or will overlay / underlay the button area if the bottom of the window is moved up. Is there any way to 'anchor' the bottom splitter bar to remain the same relative distance from the bottom of the form as initially set in design mode?
I had submitted this problem to Infragistics support. I am very happy to say that they provided me with a solution. I just didn't know exactly what properties to go after.
This is supports original code example to resolve the problem:
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
this.ultraDockManager1.ControlPanes[1].DockAreaPane.Size = new Size(730, button1.Top-20);
''Me is the form, udm1 is my UltraDockManager If Me.udm1.ControlPanes.Count > 0 Then Me.udm1.ControlPanes(1).Key = "ug1" Me.udm1.ControlPanes("ug1").DockAreaPane.Size = _ New Size(Me.udm1.ControlPanes(1).DockAreaPane.Size.Width, (Me.Height - 110)) End If
I put this code in it's own sub and call it from the Form_Load and Form_Resize events. The check for the ControlPanes.Count > 0 was necessary because of the way I am callinig the form Form_Resize actually gets called before and after Form_Load. Setting the Key property is just something I did for pane reference in later code.
Anyway, works GREAT!!!. Keeps the panes splitter bar the same distance from the bottom of the form during resize, maximize, etc.
Thanks so much Infragistics Support!!!
I am using a dock pane from an UltraDockManager to get the splitter to appear. The image in my previous message was attempting to show what the form looks like at execution time after resizing from the forms original display state.
These are the steps I've taken to create the form:
I've seen other people reporting the same issue. Haven't yet seen a solution. In one of those other messages, I've seen your response to be about the order of controls placed on the form and order of their docking. I've attempted that as a resolution, but it did not resolve the issue.
The button is on the form, not in any other child container. If I understand you correctly in 'put the button in this child container' as putting this in another dockareapane, which occupies the bottom portion of the form, this does not resolve my problem. I can anchor the button to the bottom right of the form. I want to do something similar with the splitter bar above the button. Resize fhe form and the splitter bar retains the same distance to the bottom of the form.
I've reviewed the classes in the UltraWinDock namespace. and even see some Splitter UI classes, but I don't readily see a way for me to access the correct properties / methods to control the location of the spltterbar.
I am really hopeful you will be able to provide some insight into resoling this issue.
Thanks
Lonnie
Are you using a Splitter control, a SplitContainer control, or a dock pane from an UltraDockManager to get the splitter to appear? Also, it looks like the button is overlapping the splitter. This tells me it is owned by the Form and not the child container which is below the splitter. You may want to put the button in this child container, although I don't think this is causing your issue.