Ticket T629988
Visible to All Users

Possible to add some left-side offset to tab header in XtraTabControl?

created 7 years ago

Please see the attached image.

I've customized a DX WinForms skin to make a somewhat "lighter" XtraTabControl with less lines.

The last thing I'm currently trying to work on is that I want the very first tab to not start at X position 0 but with some configurable offset.

I've already derived my own class from XtraTabControl by I'm unable to find any (nested) properties/classes to define such an offset.

My question:

How can I specify an offset for the very first tab in an XtraTabControl header?

Answers approved by DevExpress Support

created 7 years ago (modified 7 years ago)

Hello Uwe,

Thank you for reaching out to us.

The indent between the left border and the first tab is controlled by a currently applied skin. You can change the indent by using the following code snippet:

C#
Skin tabSkin = TabSkins.GetSkin(UserLookAndFeel.Default.ActiveLookAndFeel); tabSkin.Properties[TabSkinProperties.RowIndentNear] = 10;

Place the snippet before the InitializeComponent method to achieve your goal.

Regards,
Alisher

    Comments (1)

      Thanks a lot, Alisher!

      Awesome, that works as expected!

      (I've put the code in the c'tor of my XtraTabControl-derived class)

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.