A Tab control contains tab pages, which are user objects that contain controls. Tab pages can be defined within the Tab control or they can be defined in the User Object painter and inserted into the Tab control.
Each tab page can have its own label, picture, and background color.
All tab pages share the same font settings.
Tab Position controls where the tabs on the tab pages are displayed. Tabs can be displayed on any one of the four edges of the Tab control. They can also be displayed on opposite edges with the tabs before or after the selected tab jumping to the other edge.
Tab property |
Datatype |
Description |
---|---|---|
String |
A description of the control and/or its purpose for use by accessibility tools such as readers for visually impaired users. |
|
String |
A label that briefly describes the control, such as the text in a button or the name of a menu item. |
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the control is. |
|
Alignment (enumerated) |
Specifies the alignment of the text labeling all the tabs. Values are: Left! Center! Right! |
|
Long |
Specifies the numeric value of the background color: -2 to 16,777,215. For more information about color, see the section called “RGB” in PowerScript Reference. |
|
Boolean |
Specifies whether the text for the selected tab is bold. Values are: TRUE -- The text on the selected tab is bold. FALSE -- The text on the selected tab has the same setting as the other tabs. |
|
Boolean |
Specifies whether PowerBuilder moves the control to the top of the front-to-back order in the window. Values are: TRUE -- Moves to the top. FALSE -- Does not move to the top. |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing information about the class definition of the object or control. |
Boolean |
Specifies whether PowerBuilder creates graphical representations of controls on all tab pages when the Tab control is created. Values are: TRUE -- Graphical representations of tab pages are not created until the tab page is selected. FALSE -- (Default) Graphical representations of tab pages are created when the Tab control is created. |
|
Control[ ] |
UserObject |
Specifies the array of tab pages within the Tab control. |
Boolean |
Specifies whether PowerBuilder puts the control automatically into Drag mode. Values are: TRUE -- When the control is clicked, the control is automatically in Drag mode. FALSE -- When the control is clicked, the control is not automatically in Drag mode. You have to manually put the control into Drag mode by using the Drag function. |
|
String |
Specifies the name of the stock icon or the file containing the icon you want to display when the user drags the control (the ICO file). The default icon is a box the size of the control. When the user drags the control, the icon displays when the control is over an area in which the control can be dropped (a valid drop area). When the control is over an area that is not a valid drop area, the No-Drop icon displays. |
|
Boolean |
Specifies whether the control is enabled (can be selected). Values are: TRUE -- Can be selected. FALSE -- Cannot be selected. |
|
String |
Specifies the name of the typeface used for the text labels on tabs (for example, Arial or Courier). Only TrueType fonts display correctly on vertical tabs. |
|
Boolean |
Specifies whether tabs have a fixed width, meaning they do not shrink to the length of their text labels. Values are: TRUE -- Tab width is fixed; the width is determined by the longest text label. FALSE -- Tab width adjusts to the length of the text labels. |
|
Boolean |
Specifies whether each tab gets focus when the user clicks on it. Values are: TRUE -- The tab the user clicks on gets focus; a dotted rectangle marks the tab. FALSE -- The tab does not get focus. In either case, the selected tab page comes to the front. The dotted focus rectangle appears on the tab when the user clicks on it a second and subsequent times even if this property is set to false. |
|
FontCharSet (enumerated) |
Specifies the character set for the text labels on the tabs. For a complete list of possible values, see the list of properties for the FontCharSet variable on the Enumerated tab page of the Browser. |
|
FontFamily (enumerated) |
Specifies the font family (type style) for the text labels on the tabs. Values are: AnyFont! Decorative! Modern! Roman! Script! Swiss! |
|
FontPitch (enumerated) |
Specifies the pitch (spacing) of the font for text labels on the tabs. Values are: Default! Fixed! Variable! |
|
Integer |
Specifies the height of the control, in PowerBuilder units. |
|
Boolean |
Specifies whether the text on the tabs is italic. Values are: TRUE -- Text labels are italic. FALSE -- Text labels are not italic. |
|
Boolean |
Specifies whether the tabs can appear in more than one row. Values are: TRUE -- If there is not room for all the tabs in a single row, the tabs are arranged in multiple rows. FALSE -- If there is not room for all the tabs in a single row, a dual arrow control displays to allow the user to scroll to tabs that do not fit. |
|
Boolean |
Specifies whether the tab labels are drawn perpendicular to the tab page. Values are: TRUE -- Text is perpendicular to the edge of the tab page, resulting in narrower tabs. FALSE -- Text runs along the edge of the tab page, resulting in wider tabs. |
|
Boolean |
Specifies whether a picture that is part of the tab label is to the right or left of the text. Values are: TRUE -- The picture is on the right. FALSE -- The picture is on the left. |
|
String |
Specifies the name of the stock pointer or the file containing the pointer used for the control. |
|
Boolean |
Specifies whether PowerTipText for a tab page is displayed as a PowerTip (a pop-up label for the tab) when the mouse pointer pauses over the tab. PowerTips are useful if the tabs are labeled with pictures. Values are: TRUE -- PowerTipText, if any, displays as a pop-up label for each tab. FALSE -- No PowerTips are displayed. |
|
Boolean |
Specifies whether tabs are stretched so that they fill space along the edge of the control. Values are: TRUE -- Tabs remain the size determined by their label text and the FixedWidth property. FALSE -- Tabs are stretched to fill the edge. |
|
Integer |
Specifies the index number of the selected tab. The default value is 1, and the integer must be in the range 1 to N, where N is the number of tab pages. |
|
Boolean |
Specifies whether the picture selected for each tab is displayed. Values are: TRUE -- The picture for each tab, if any, is displayed. FALSE -- No pictures are displayed. |
|
Boolean |
Specifies whether the text specified for each tab label is displayed. Values are: TRUE -- The text for each tab is displayed. FALSE -- The text for each tab is not displayed. |
|
Integer |
Specifies the tab value of the control within the window (0 means the user cannot tab to the control). |
|
TabPosition (enumerated) |
Specifies where the tabs appear around the Tab control. Values are:
|
|
String |
Specifies the tag value assigned to the control. |
|
Integer |
Specifies the size of the text in the control, in points. For backward compatibility, the size is stored as a negative number; for example, 10-point text size is stored as -10. |
|
Boolean |
Specifies whether the text on the tabs is underlined. Values are: TRUE -- Text labels are underlined. FALSE -- Text labels are not underlined. |
|
Boolean |
Specifies whether the control is visible. Values are: TRUE -- Is visible. FALSE -- Is not visible. |
|
Integer |
Specifies the stroke weight of the text in the control; for example, 400 for normal or 700 for bold. |
|
Integer |
Specifies the width of the control, in PowerBuilder units. |
|
Integer |
Specifies the X position (the distance from the left edge of the window), in PowerBuilder units. |
|
Integer |
Specifies the Y position (the distance from the top of the window), in PowerBuilder units. |
Tab Event |
Occurs |
---|---|
When the user clicks in the Tab control, except in the display area of the tab page. For the tab page, the Clicked event (pbm_bnclicked) for the user object is triggered instead. |
|
When the object is created, immediately before the Open event occurs in the window. |
|
When the object is destroyed, immediately after the Close event occurs in the window. |
|
When the user double-clicks in the Tab control, except in the display area of the tab page. For the tab page, the DoubleClicked event (pbm_bndoubleclicked) for the user object is triggered instead. |
|
When a dragged control is dropped in the tab area of the control. |
|
When a dragged control enters the control, including entering the narrow border around the display area. |
|
When a dragged control leaves the control, including leaving by crossing into the tab page display area. |
|
When a dragged control is within the control, but not within the tab page display area. |
|
Just before the control receives focus (before it is selected and becomes active). |
|
When the user presses the F1 key or drags the context help button (question mark) from the title bar to a menu item or control. |
|
When the user presses a key. |
|
When the control loses focus (becomes inactive). |
|
When a Windows message occurs that is not a PowerBuilder event. |
|
When the user clicks with the right mouse button in the Tab control, except in the display area of the tab page. If the user right-clicks on the tab page, the controls or user objects on the tab page get an RButtonDown event. |
|
When the user double-clicks with the right mouse button in the Tab control, except in the display area of the tab page. For the tab page, the RightDoubleClicked event (pbm_rbuttondblclk) for the user object is triggered instead. |
|
Just after the selection changes to another tab. SelectionChanged is triggered when the tab is created and the initial selection is established. |
|
Just before the selection changes to another tab. To prevent the selection from changing, return 1 in the event script. SelectionChanging is triggered when the tab is created and the initial selection is established. |
Tab function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the control. |
|
Integer |
Closes a tab page that was opened with the OpenTab function. |
|
Integer |
Starts or ends dragging of the control. |
|
Integer |
Creates a reference to a context-specific instance of the specified service. |
|
PowerObject |
Returns a reference to the parent of the Tab control. |
|
Integer |
Makes the control invisible. |
|
Integer |
Moves the control to a specified location. |
|
Integer |
Moves a tab to a new position in the order of tabs. |
|
Integer |
Opens the specified user object as a tab page, making its properties available to scripts. |
|
Integer |
Opens the user object as a tab page, making its properties available to scripts, and stores a parameter in the Message object. |
|
Integer |
Returns the distance of the pointer from the left edge of the control. |
|
Integer |
Returns the distance of the pointer from the top of the control. |
|
Integer |
Adds the specified event to the end of the event queue for the specified object. |
|
Integer |
Prints the contents of the control. You can specify a range of pages and other settings. |
|
Integer |
Changes the size of the tab page to the size specified in the width and height arguments. |
|
Integer |
Selects a tab page. |
|
Integer |
Sets focus to the Tab control. |
|
Integer |
Specifies the control's position in the front-to-back order within the window. |
|
Integer |
Controls automatic redrawing of the control. |
|
Integer |
Makes the control visible. |
|
Integer |
Adds an event to the end of the message queues for each of the tab pages. |
|
Integer |
Sends an event to every tab page and, for each page, executes the script associated with the event. |
|
Integer |
Triggers a specified event in the control and executes the script for the event. |
|
Object |
Returns the type of the control. |