TabbedBar control

Currently the TabbedBar control is only used to implement the tabbed bar in the MDI/MDIHelp window.

If you have enabled TabbedView for an MDI/MDIHelp window, PowerBuilder will automatically add a tabbed bar control (mditbb_1) to the window. You can check the following tables to find out which properties/functions of the tabbed bar control you can access.

For more information about the TabbedView option, please refer to the section called “Displaying sheets in tabbed view” in Application Techniques.

Properties

TabbedBar property

Datatype

Description

AccessibleDescription

String

Unsupported.

AccessibleName

String

Unsupported.

AccessibleRole

AccessibleRole (enumerated)

Unsupported.

AutosizeHeight

Boolean

Specifies whether the height of the tabbed bar automatically changes according to the font type or size of the title text. Default is True.

TRUE -- (Default) Automatically change the height of the tabbed bar according to the font type or size of the title text.

FALSE -- Does not automatically change the height. The height is 104 PBUs by default, and it can be changed using the Height property.

mditbb_1.AutosizeHeight = false

BringToTop

Boolean

Unsupported.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

DragAuto

Boolean

Unsupported.

DragIcon

String

Unsupported.

FaceName

String

Specifies the font name for the text shown in the tab header. Default is Tahoma.

mditbb_1.FaceName = "Tahoma"

FontCharSet

FontCharSet (enumerated)

Unsupported.

FontFamily

FontFamily (enumerated)

Unsupported.

FontPitch

FontPitch (enumerated)

Unsupported.

Height

Integer

Specifies the height of the control. The height is 104 PBUs by default. This property takes effect when AutosizeHeight property is False.

Italic

Boolean

Unsupported.

NewTabAtRightMost

Boolean

Specifies whether to open the new tab from the right most location of the bar. Values are:

TRUE -- (Default) Opens the new tab from the right most location of the bar.

FALSE -- Opens the new tab from the left most location of the bar.

mditbb_1.NewTabAtRightMost = false

ShowCloseButton

Boolean

Specifies whether to show the close button in the tab header. Values are:

TRUE -- (Default) The close button is shown in the tab header.

FALSE -- The close button is not shown in the tab header.

mditbb_1.ShowCloseButton = true

ShowContextMenu

Boolean

Specifies whether to display the popup menu when the right mouse button is clicked on the tab header. Values are:

TRUE -- (Default) The popup menu is shown.

FALSE -- The popup menu is not shown.

The following menus may be available in the popup menu: Save, Save As, Close Current Tab, Close Tabs to the Left, Close Tabs to the Right, Close All But This, and Close All Tabs.

mditbb_1.ShowContextMenu = true

ShowIcon

Boolean

Specifies whether to show the window icon in the tab header. Values are:

TRUE -- (Default) The window icon is shown.

FALSE -- The window icon is not shown.

If no icon is set for the sheet windows, then the icon of the MDI/MDIHelp window will be displayed; if no icon is set for the MDI/MDIHelp window and the sheet windows, then the default icon for window will be displayed.

mditbb_1.ShowIcon = true

ShowPowerTips

Boolean

Specifies whether to show a PowerTip when the user moves a cursor over the tab header. Values are:

TRUE -- (Default) The PowerTip is shown.

FALSE -- The PowerTip is not shown.

When this property is true, the value of the PowerTipText property of the sheet window will be displayed as the PowerTip.

If the Window PowerTipText property has no value, then the window title will be displayed as the tool tips; if the window title has no value, then "Untitled" will be displayed as the tool tips.

mditbb_1.ShowPowerTips = true

ShowSeparator

Boolean

Specifies whether to show the separator symbol between the tab headers. Values are:

TRUE -- (Default) The separator symbol is shown.

FALSE -- The separator symbol is not shown.

mditbb_1.ShowSeparator = true

ShowText

Boolean

Specifies whether to show the window title in the tab header. Values are:

TRUE -- (Default) The window title is shown.

FALSE -- The window title is not shown.

If no title is set for the sheet windows, then "Untitled" will be displayed as the title.

mditbb_1.ShowText = true

TabOrder

Integer

Unsupported.

Tag

String

Unsupported.

TextSize

Integer

Specifies the font size of the text in the tab header, in points. For backward compatibility, the size is stored as a negative number; for example, 15-point text size is stored as -15.

When the font size is changed and the AutosizeHeight property is true, the height of the tabbed bar is automatically adjusted to the best size, therefore, you can adjust the font size to adjust the bar height. The Code Example App included in the product contains code examples for this.

mditbb_1.TextSize = -15

Transparency

Integer

Unsupported.

Underline

Boolean

Unsupported.

Visible

Boolean

Specifies whether the control is visible. Values are:

TRUE -- Is visible.

FALSE -- Is not visible.

By default, the Visible property of the mditbb_1 object is false. When the TabbedView option is selected and a sheet window is opened, the Visible property automatically changes from false to true (so the mditbb_1 object becomes visible). And when all of the sheet windows are closed, the Visible property automatically changes to false again (so the mditbb_1 object becomes invisible).

However, if the Visible property is set to false via scripts, when the TabbedView option is selected and a sheet window is opened, the mditbb_1 object will NOT be visible. You will need to set the Visible property from false to true in the script, to display the mditbb_1 object.

Weight

Integer

Unsupported.

Width

Integer

Specifies the width of the control, in PowerBuilder units.

X

Integer

Specifies the X position (the distance from the left edge of the window), in PowerBuilder units.

Y

Integer

Specifies the Y position (the distance from the top of the window), in PowerBuilder units.


Events

This control has no associated events currently.

Functions

TabbedBar function

Datatype returned

Description

ClassName

String

Returns the name assigned to the control.

GetContextService

Integer

Creates a reference to a context-specific instance of the specified service.

GetParent

PowerObject

Returns a reference to the parent of the control.

Hide

Integer

Makes the control invisible.

Move

Integer

Unsupported.

PostEvent

Integer

Unsupported.

Resize

Integer

Unsupported.

SetRedraw

Integer

Unsupported.

Show

Integer

Makes the control visible.

TriggerEvent

Integer

Unsupported.

TypeOf

Object

Returns the type of the control.