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
785
With Tabs on top of docking area, how to give a Top Padding?
posted

I have an UltraDockManager with a bank of tabs in the one and only docking area.  The tabs are at the top of the docking area.  I would like to give a buffer (padding) to the top of the tabs themselves since they are butting up to the Toolbar at the top of the window area.

See below.  Note the top of the tabs have zero pixels between them and the bottom of the toolbar above them.

Going into the property page settings for this control I could only find PaddingTop for the DefaultPaneSettings.  When setting this, I get a padding on top of the tabs as I wanted but I also get it on the bottom of the tabs (bug).

See below.  I indicated the PaddingTop for the DefaultPaneSettings to be 22 pixels.

Any idea how to simply get a two pixel padding on the top of the tabs?

 

Parents
No Data
Reply
  • 5118
    posted

    So doing that setting give the DockableControlPane and the DockAreaPane a PaddingTop of 22.  I know what you mean though...

    You can get the behavior you want by setting the DockAreaPane.PaddingTop = 2.  (5 looks a little better than 2). 

    Couple ways to do that:
        Designer -> DockManager -> DockAreas -> DockAreaPane[X] (x is your index where the DockArea is Left in the screen shot) -> Settings -> PaddingTop. 
        Code -> handle InitializePane and check the key/location/etc. to see what Pane it is and if it is one you want to get its DockArea of just set the e.Pane.DockAreaPane.Settings.PaddingTop property.  Here you should check to see if its already been set for that DockAreaPane as you have 5 Panes that would initialize.  
        Code -> handle form load / form shown and get the DockAreaPane from a control with ultraDockManager1.PaneFromControl(this.ultraGroupBox1).DockAreaPane.Settings.PaddingTop = 5;

    Bunch of ways but just make sure you are only setting the PaddingTop of the DockAreaPane and not the DockableControlPanes also... which is what that setting does straight off the DockManager.

Children
No Data