BUG: TabStrip Control's TabStyle Has No Effect at Run-Time
ID: Q190685
|
The information in this article applies to:
-
Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0
SYMPTOMS
Changing the TabStyle property of the TabStrip control at run-time has no
effect.
RESOLUTION
You must set the TabStyle property at design-time.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
MORE INFORMATION
If you have more then one row of tabs, the TabStyle property determines how
remaining rows of tabs in front of a selected tab are repositioned. If you
set the TabStyle to tabTabStandard, the remaining tabs remain on the same
side of the control. If the TabStyle is set to tabTabOpposite, the row(s)
of tabs in front of the selected tab are repositioned at the opposite side
of the control. For the default value of the placement property, this would
be top and bottom, respectively. However, changing the TabStyle property at
run-time has no effect on how the tabs are displayed.
Steps to Reproduce Behavior
- Create a new Standard EXE project. Form1 is created by default.
- Using the Projects menu, select Components to bring up the Components
dialog box. On the Controls Tab, select "Microsoft Windows Common
Controls 6.0," and then click OK.
- Place a TabStrip and two CommandButtons on Form1.
- In the Property Page for the TabStrip, set the MultiRow property to
True. Then add enough Tabs so you have more than one row of tabs.
- Add the following Code to Form1:
Private Sub Command1_Click()
TabStrip1.TabStyle = tabTabOpposite
Debug.Print TabStrip1.TabStyle
End Sub
Private Sub Command2_Click()
TabStrip1.TabStyle = tabTabStandard
Debug.Print TabStrip1.TabStyle
End Sub
Private Sub Form_Load()
Command1.Caption = "Tab Opposite"
Command2.Caption = "Tab Standard"
End Sub
- Save and run the project. Click on the Tab Opposite button, then try
selecting tabs from different rows. Click on the Tab Standard button,
and then try selecting tabs from different rows. You will not see any
change.
- Return to design mode and set the TabStyle to 1-tabTabOpposite in the
Property Page for the TabStrip. Then run the project and try selecting
tabs from different rows. You will see the correct behavior.
Additional query words:
kbDSupport kbDSD kbCtrl kbComCtrls kbVBp kbVBp600bug
Keywords : kbGrpVB
Version :
Platform : WINDOWS
Issue type : kbbug