cpr.controls.TabItem

Items in tabbed folders, MDI folders.

Index

Properties
Name Type Description
checked Boolean Gets whether the tab item's checkbox is filled or not.
closable Boolean Returns whether the close button of the Tab Item is displayed.
content UIControl Returns the internal control of the Tab Item.
enabled Boolean Gets whether the tab item is enabled or not.
focused Boolean Returns whether the tab item currently owns focus.
id Number Returns an identification value indicating the order in which the tab items were added to the tab folder.
itemIndex Number Get the index of the item within the tab folder.
name String Gets a name to identify the tab item.
tabFolder TabFolder Returns the tab folder control of the tab item.
text String Returns the displayed text of the Tab Item.
tooltip String Get the tooltip text for the tab item.
visible Boolean Gets the visibility of the tab item's header.
Methods
Name Return Type Description
bind IBindFactory Gets the bind factory for the given attribute name.
close Close the item.
focus Gives focus to the tab item.
getActualRect Rectangle Gets the area the tab item is displaying in the browser viewport area.
getBindContext BindContext Returns the bind context.
getBindInfo BindInfo Returns the bind property information for the control.
getUserAttrNames String[] Returns all custom attribute names.
isBindable Boolean Make sure it is a bindable property.
redraw Schedule a repaint of the tab item.
removeAllUserAttr Delete all custom attributes.
removeUserAttr Removes user-defined attributes for a specific attribute name.
unbind Unbind that property.
userAttr Specifies custom properties.
userattr Object Returns a user-defined property.

Constructor

TabItem()
Create a tabbed folder.

Properties

checked
type Boolean
get
Gets whether the tab item's checkbox is filled or not.
set
Specifies whether the tab item's check box is filled.
closable
type Boolean
get
Returns whether the close button of the Tab Item is displayed.
set
Sets whether to display the close button of TabItem.
content
type UIControl
get
Returns the internal control of the Tab Item. Returns the layout surrounding the control.
set
Set the internal controls of the Tab Item. Set the layout.
enabled
type Boolean
get
Gets whether the tab item is enabled or not. Disabled tab items cannot be selected by the user.
set
Specifies whether to activate the tab item.
focused
type Boolean
readonly
Returns whether the tab item currently owns focus.
id
type Number
readonly
Returns an identification value indicating the order in which the tab items were added to the tab folder. This value starts at 1 and is not in the order being displayed.
itemIndex
type Number
readonly
Get the index of the item within the tab folder. If it does not belong to the tab folder, -1 is returned.
name
type String
get
Gets a name to identify the tab item.
set
Specifies a name to identify the tab item.
tabFolder
type TabFolder
readonly
Returns the tab folder control of the tab item.
text
type String
get
Returns the displayed text of the Tab Item.
set
Tab Set the displayed text of the item.
tooltip
type String
get
Get the tooltip text for the tab item.
set
Specifies the tooltip text for the tab item.
visible
type Boolean
get
Gets the visibility of the tab item's header.
set
Specifies whether the tab item is visible in the header. If this value is false, it will not appear in the header. You will only be able to select it through the API.

Methods

bind(name)
Gets the bind factory for the given attribute name.
Parameters
name type description
name #bindable-property_name The attribute name for which to get the bind factory.
return IBindFactory
close()
Close the item. If the selected tab item is closed, change the nearest item from the index of the closed tab item to the selected tab item.
focus(immediate)
Gives focus to the tab item.
Parameters
name type description
immediateoptional Boolean defaultfalse
getActualRect()
Gets the area the tab item is displaying in the browser viewport area.
return Rectangle
getActualRect(options)
Gets the area the tab item is displaying in the browser viewport area.
Parameters
name type description
options { scaled: Boolean }
return Rectangle
getBindContext()
Returns the bind context.
return BindContext bind context
getBindInfo(name)
Returns the bind property information for the control.
Parameters
name type description
name #bindable-property_name The name of the attribute being bound.
return BindInfo BindInfo Properties
getUserAttrNames()
Returns all custom attribute names.
return String[] An array of all custom attribute names.
isBindable(name)
Make sure it is a bindable property.
Parameters
name type description
name #bindable-property_name Attribute name
return Boolean Confirmation.
redraw()
Schedule a repaint of the tab item.
removeAllUserAttr()
Delete all custom attributes.
removeUserAttr(key)
Removes user-defined attributes for a specific attribute name.
Parameters
name type description
key String The custom attribute name to remove.
unbind(name)
Unbind that property.
Parameters
name type description
name #bindable-property_name Attribute name to unbind.
userAttr(key, value)
Specifies custom properties.
Parameters
name type description
key String The attribute name to assign
value String The attribute value to specify.
userAttr(key)
Returns a user-defined property.
Parameters
name type description
key String The attribute name to get.
return String Custom properties.
userAttr(values)
Specify multiple custom properties at once.
Parameters
name type description
values {[key:string]: String} A JSON object containing custom attribute keys/values.
userAttr()
Get all custom properties in the form of a map.
return {[key:string]: String}
userattr()
deprecatedPlease use userAttr.
Returns a user-defined property.
return Object Custom properties.