TabbedMDIWindow ImageMargin

Docking/MDI for Windows Forms Forum

Posted 14 years ago by Ernesto Serrano - Software Developer, VyS Yecla S.L.
Avatar
Hello, I'm trying to set 4 pixel border to a tabbedMDIWindow and I've found the TabStripRenderer.TabStripTabImageMargin property, but this property only is valid for the left margin.
There are any property to set a margin for all borders on the TabbedMDIDocument image?

Thanks!

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The tab padding is measured like this if you have images and text on a tab:
(TabStripTabImageMargin) (Image) (TabStripTabTextMargin) (Text) (TabStripTabTextMargin)


Actipro Software Support

Posted 14 years ago by Ernesto Serrano - Software Developer, VyS Yecla S.L.
Avatar
OK, thanks for your reply, but for Top and Bottom margins, what can I do?

Thanks!
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Right now the renderers use their own fixed values for those. However you can update it by creating a class that inherits the desired renderer to modify and do something like this:
public override Size MeasureTabStripTab(Graphics g, TabStripPage tabStripPage) {
    Size size = base.MeasureTabStripTab(g, tabStripPage);
    if (tabStripPage.TabStrip.Orientation == Orientation.Horizontal)
        size.Height += 4;
    else
        size.Width += 4;
    return size;
}


Actipro Software Support

Posted 14 years ago by Ernesto Serrano - Software Developer, VyS Yecla S.L.
Avatar
OK, this works fine for me.

Thanks!
The latest build of this product (v2020.1 build 0402) was released 23 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.