How to: Set the Height and Width of Tabs in a MultiPage and a TabStrip Control
Article
Outlook Developer Reference
The following example uses the TabFixedHeight and TabFixedWidth properties to set the size of the tabs used in MultiPage and TabStrip. The user clicks the SpinButton controls to adjust the height and width of the tabs within the MultiPage and TabStrip.
To use this example, copy this sample code to the Script Editor of a form. To run the code you need to open the form so the Open event will activate. Make sure that the form contains:
A SpinButton named SpinButton2 for the height control that is bound to a custom number field named SpinButtonHeight.
A TextBox named TextBox2 for the height control.
Sub UpdateTabWidth()
Set TextBox1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("TextBox1")
Set SpinButton1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("SpinButton1")
Set TabStrip1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("TabStrip1")
Set MultiPage1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("MultiPage1")
Sub UpdateTabHeight()
Set TextBox2 = Item.GetInspector.ModifiedFormPages("P.2").Controls("TextBox2")
Set SpinButton2 = Item.GetInspector.ModifiedFormPages("P.2").Controls("SpinButton2")
Set TabStrip1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("TabStrip1")
Set MultiPage1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("MultiPage1")
Sub Item_Open()
Set TextBox1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("TextBox1")
Set TextBox2 = Item.GetInspector.ModifiedFormPages("P.2").Controls("TextBox2")
Set SpinButton1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("SpinButton1")
Set SpinButton2 = Item.GetInspector.ModifiedFormPages("P.2").Controls("SpinButton2")
Set TabStrip1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("TabStrip1")
Set MultiPage1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("MultiPage1")
Set Label1 = Item.GetInspector.ModifiedFormPages("P.2").Controls("Label1")
Set Label2 = Item.GetInspector.ModifiedFormPages("P.2").Controls("Label2")
Sub Item_CustomPropertyChange(byval pname)
'msgbox pname
If pname = "SpinButtonWidth" Then
UpdateTabWidth
ElseIf pname = "SpinButtonHeight" Then
UpdateTabHeight
End If
End Sub