CwTabStrip
CwTabStrip is like a set of dividers in a notebook.
Protocol
Protocols can be divided into several groups:
pertaining to creation
pertaining to the tab strip
pertaining to a tab contained in the tab strip. Those tabs are instances of CwTab.
creation
createTab: theName argBlock: argBlock
add a CwTab as a child of the receiver.
tab strip
clientHeight
height of the internal area
clientLeft
left edge of the internal area
clientTop
top edge of the internal area
clientWidth
width of the internal area
deleteAllItems
remove all tabs in the receiver.
deleteItem:
remove the specified button from the receiver.
deleteItems:
remove the specified tabs from the receiver.
items
answer the tabs in the receiver.
numItems
answer number of tabs in the receiver.
seletedItems
answer selected tabs in the receiver.
showTips
Answer whether the receiver will show tooltip on the tabs.
showTips: aBoolean
Set whether the receiver will show tooltip on the tabs.
tab
image
Answer image displayed by receiver.
image: aCgPixmap
Set image displayed by receiver.
toolTipText
Answer the text for thereceiver's tooltip.
toolTipText: aString
Set the text for thereceiver's tooltip.
Callbacks and Events
The tab strip has callbacks or events specific to it.
Single selection
executed when the receiver is clicked; the call data object is CwAnyCallbackData
valueChanged
executed when the receiver is activated. The call data object is CwConfirmationCallbackData
Example
Create a tab strip with three tabs.
tabStrip := CwTabStrip
createWidget: 'tabstrip'
parent: shell
argBlock: nil.
tabStrip manageChild.
 
"Callbacks for changing which page in the tab strip is viible.
selectors manipulate the properties of the pages."
tabStrip
addCallback: XmNmodifyVerifyCallback
receiver: self
selector: #modifyVerify:clientData:callData:
clientData: nil;
addCallback: XmNsingleSelectionCallback
receiver: self
selector: #singleSelection:clientData:callData:
clientData: nil;
 
addCallback: XmNresizeCallback
receiver: self
selector: #resize:clientData:callData:
clientData: nil.
 
pages := Array new: (count := 3).
1 to: count do: [:i |
tabStrip
createTab: 'tab'
argBlock: [:w |
w
labelString: ('Item %1' bindWith: i printString);
toolTipText: ('Tip %1' bindWith: i printString);
image: icon]].
(self getPage: 1) manageChild.
 
Last modified date: 01/29/2015