![]() Chapter Contents |
![]() Previous |
![]() Next |
| Tab Layout: _setTabs |
| Syntax | |
| Tab-definition List Items | |
| Example |
Syntax |
| CALL NOTIFY (tabber-name, '_setTabs', tabs); |
| Argument | Type | Description |
|---|---|---|
| tabs |
N | specifies the identifier of an SCL list; this list should be either a tabs-list or a groups-list |
A tabs-list contains a tab-definition list for each tab. A groups-list contains a group-definition list for each group of tabs.
| List Item | Type | Description |
|---|---|---|
| 'ID' | N | (optional) unique tab identifier; if an identifier is not specified, one is assigned by the tab layout class in successive order beginning with 1 |
| 'COLOR' | C | (optional) color of the tab; defaults to color set with _setTabColor method |
| 'LABEL' | C | (optional) the text displayed within a tab |
| 'LABEL_COLOR' | C | (optional) color of the text label; defaults to color set with _setLabelColor method |
| 'SELECTED' | C | (optional) 'Y' or 'N' flag indicating if the tab is selected; defaults to 'N' |
| 'GRAYED' | C | (optional) 'Y' or 'N' flag indicating if the tab is grayed; defaults to 'N' |
| 'CLIENT' | C | (optional) the name of the client object. If the name of an existing object is provided, that object is used as the client object. If a new name is provided, a container box is created with the specified name. If no name is provided, a container box is created with a default name that can be found using _getTabs and examining the corresponding CLIENT item in that tabs list. |
| Example |
This example defines three tabs labeled "Task," "Schedule," and "Plan." The example demonstrates how you can use the _setTabs method to create the tab layout.
/* create root tab-list */
tabs = makelist ();
/* define the three tabs and add them */
/* to our root list */
array labels{3} $8 ("Task", "Schedule",
"Plan");
do id = 1 to dim(labels);
tab = makelist ();
rc = setnitemn (tab, id, "ID");
rc = setnitemc (tab, labels{id}, "LABEL");
rc = setiteml (tabs, tab, id, "Y");
end;
/* display tabs on-screen */
call notify ('tabber', '_setTabs', tabs);
/* tabber copies the list */
tabs = dellist (tabs);
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.