Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
420
Need to resize Docked Panel when toolbar area with the panel increase/decreases
posted

We have an UltraToolbarsManager with 5+ toolbars inside a panel.  That Panel is then docked use an UltraDockManager at the top of the screen.  Below all of this is a grid.  We would like this because we would like to be able to allow the user hide these menus as the need in order for the grid to be at maximum possible size to allow for more efficiency.

 We would like to have the dockable pane that contains the toolbars to expand/contract depending on the number of rows of toolbars are displayed.  However, I am unable to find a way to detect if a toolbar has moved from row one down to row two creating a "new" toolbar row or vice versa, if I had each of the 5 toolbars on a separate row and I either hide one OR move one up to share a row with one of the other toolbars.

 Is there something I can set or an event that I can plug into to be able to adjust the Docked window to grow/shrink as needed?

  • 44743
    posted

    You can try handling the ToolbarModified event, which will occur when the toolbar is being dragged around. When it is fired, you can iterate the controls of the Panel and get the height of the UltraToolbarsDockArea which has a DockedPosition of Top. That will be the height required to display the toolbars on the top.