Page 442 - Microsoft Office Excel 2003 Programming Inside Out
P. 442
Part 5: Manipulating Excel Objects
Microsoft Office Excel 2003 Programming Inside Out
Each tab object contains unique Name and Index values, which are used to locate the tab
from within the collection. The Caption property contains the text that will be displayed on
the tab.
The Style property allows you to choose the way the tab information is displayed. By default,
fmTabStyleTabs is selected. However, you can specify fmTabStyleButtons to display buttons
Chapter 19
instead of tabs. Finally, you can choose fmTabStyleNone so that no tab information is dis
played on the control.
When the MultiRow property is True, the tab strip can have more than one row of tabs. The
TabOrientation property specifies where the tabs are located. Valid choices for TabOrienta
tion include: fmTabOrientationTop, fmTabOrientationBottom, fmTabOrientationLeft, and
fmTabOrientationRight.
The size of the tabs are specified using the TabFixedHeight and TabFixedWidth properties. If
these properties are assigned a value of zero, the tab sizes are automatically adjusted to fit the
contents; otherwise, the value specifies the point size that will be used for each tab.
Typically, you’ll use this control at design time and drag controls onto the various tab sur
faces as you design your application. At run time, the user merely clicks the appropriate tab
button to switch to the desired tab. You can add and remove forms within the TabStrip con
trol by right-clicking the control and choosing the appropriate option from the pop-up menu.
Tip No Programming Required
This control typically needs no programming. The only time you might want to write any code
for a TabStrip control is when you want to automatically shift the user from one tab to
another as a result of interacting with a control on one of the tabs.
416

