|
Support
ActiveX / COM
Visual C++ / MFC
Customer Spotlight
Corporate Partners
Contact Sales
Call center available M-F 9:00 - 6:00 US Eastern Time. U.S. and Canada International Email |
Adding Multi-Row Tabs
Author: Mike Palmatier
Posted: May 3, 2006
Environment: Visual C++ 6.0
The TabControl can display more than one row of tabs by using the SetLayout method to apply the xtpTabLayoutMultiRow flag. The number of rows is automatically set by the width and number of the tabs. The number of rows can change if the control is resized, which ensures that the tabs wrap to the next row. If the tab layout is not set to xtpTabLayoutMultiRow, and the last tab exceeds the width of the control, left and right arrow buttons are added at the right end of the TabControl.
'The TabControl can display more than one row of tabs 'by changing the Layout to xtpTabLayoutMultiRow. m_wndTabControl.GetPaintManager()->SetLayout(xtpTabLayoutMultiRow);
The m_bMultiRowJustified property specifies the justification of the tabs in the TabControl.
When True, each tab is wide enough to accommodate its caption and, if needed, the width of each tab is increased
so that each row of tabs spans the width of the TabControl. This will stretch each row of tabs to fill the entire width
of the TabControl.
'The MultiRowJustified property specifies the 'justification of the tabs in the TabControl. m_wndTabControl.GetPaintManager()->m_bMultiRowJustified = TRUE;
The m_bMultiRowFixedSelection property specifies whether the the row of the currently selected tab
will be moved to the front of the tab rows. This determines how remaining rows of tabs in front of a
selected tab are repositioned.
'Specifies whether the the row of the currently selected 'tab will be moved to the front of the tab rows. This 'determines how remaining rows of tabs in front of a 'selected tab are repositioned. m_wndTabControl.GetPaintManager()->m_bMultiRowFixedSelection = TRUE; |
