Chapter Contents |
Previous |
Next |
Work Area: _newItem |
Syntax | |
Details | |
Example |
Syntax |
CALL NOTIFY (workarea-name, '_newItem', item-list); |
Argument | Type | Description |
---|---|---|
item-list |
N | specifies the identifier of an SCL list containing one or more sublists that define the new item. See the _new method for the Class class for more information on the format of this list. |
Details |
Item-list must contain a value for the _classname sublist item, which specifies the class of the item to be created. This value is the two-level name used by the work area's RESOURCE entry.
Optionally, item-list can contain the _region sublist, which provides values for the region position variables and places the item in the work area. This sublist can contain only one of the groups of items in the following table:
If the list contains... | Then... |
---|---|
coordinates for both the variables 'ULX' and 'ULY' | the work area item is placed at the specified position using the default size |
coordinates for the four variables 'ULX', 'ULY', 'LRX', and 'LRY' | the work area item is placed at the position specified by ULX and ULY and is sized to LRX and LRY |
no values for the region variables | the work area item is placed in the first available appropriate place. That is, the item is centered horizontally within a grid only if that grid slot is not occupied. The size of the grid is defined in the Attributes window or in the Adjust Arrangement dialog box. |
Example |
Create a frame with a work area. Use the following code to define a graphic text object and place it in the work area, WORK1. Use the _region list to position it in the upper left corner (1,1):
INIT: /* Create an ITEM list. */ itemlst=makelist(); /* Create a sublist to contain the */ /* class information and attributes. */ classlst=makelist(); /**/ /* Add an item for _classname. */ classlst=setnitemc(classlst,'GTEXT.GTEXT', '_classname_'); /* Insert attribute items for COLOR */ /* and TEXT, */ classlst=insertc(classlst,'yellow',-1, 'color'); classlst=insertc(classlst,'New GTEXT Widget',-1,'TEXT'); /* insert the class list information */ /* into the item list */ itemlst=insertl(itemlst,classlst,1); /* Create a region sublist to contain */ /* the positioning information */ region=makelist(); /* Insert the region list into the */ /* class list */ classlst=setniteml(classlst,region,' _region_'); /* Add items to the region list to */ /* position the widget */ /* in the upper left corner of */ /* the workarea */ region=setnitemn(region,1,'ulx'); region=setnitemn(region,1,'uly'); /* Add the graphic text item list to */ /* the work area */ call notify('work1','_new_item_',itemlst);; dellist(itemlst); return;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.