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
875
How do you get the width of a tab?
posted

Hey,

We want to have one UltraWebTab control with one or more rows of tabs.  I found a thread (http://forums.infragistics.com/forums/p/5871/64132.aspx#64132) which says that there's no way for the tab to automatically jump to the next row if the tabs have extended past the width of the main tab control. 

So this is fine and initially I thought it would be easy to just check the width of each tab and compare it against the total width available to determine if we need to jump to the next row or not, but as it turns out, it doesn't appear to be that simple because there is no width property of the Infragistics.WebUI.UltraWebTab.Tab object.

My question is, without being able to obtain the width of each individual tab, how to I know whether that tab has gone over the width set on its parent the UltraWebTab control?

I had been wanting to do something similar to the below, but obviously this won't work:

            For Each tabItem In tabControl.Tabs
                currentWidth = currentWidth + tabItem.width
                If currentWidth > tabControl.Width Then
                    tabItem.NextRow = True
                    currentWidth = 0
                End If
            Next

I'm assuming other people must have done this before, so how do you do it?

Thanks.

Parents Reply Children
No Data