Chapter Contents


Work Area: _selectItem

Work Area: _selectItem

Adds one or more items to the list of selected work area items

See Also


CALL NOTIFY (workarea-name, '_selectItem', selected-list, action);

Argument Type Description
N specifies the identifier of an SCL list containing the work area items to be listed as currently selected. The list must contain object identifiers that are lists and not numbers. Each identifier needs to be named as well with the name of the object.
C specifies how to handle the contents of selected-list:

'APPEND' adds item to list (caused by shift-click)

'REPLACE' replaces all selections in the list with this selections (caused by a single click)


_selectItem allows users to select one item or multiple items.

The method runs automatically when a work area item is selected. The APPEND and REPLACE values are used internally to maintain the list returned by _selectItem.

When you select a work area item, the _selectItem method runs, which in turn runs the _setSelection Widget method. When selected, the item is highlighted with the default border color. However, upon deselection, the work area background color is passed to the _setSelection method; as a result when the item is deselected, the background color of the item replaces the border color and the item appears to lose its border. To change this behavior, override the _setSelection method when you create the subclass.


This example shows how to select all items within a work area. It can be provided with the frame containing the work area.

   widgets = makelist();

      /* Get all the items within the  */
      /* work area */
   call notify('work1','_getWidgets'
      /* Delete these items if they  */
      /* are on the list */
   if nameditem(widgets,'ICONSIZEX') then
      rc = delnitem(widgets,'ICONSIZEX');
   else if nameditem(widgets,'ICONSIZEY') then
      rc = delnitem(widgets,'ICONSIZEY');

      /* Make a list of object identifiers. */
      /* Note that _getWidgets    */
      /* does not return a list of */
      /* identifiers, but is a list     */
      /* describing the items.  _SELF_ */
      /* is the identifier of that item. */
   objids = makelist();
   do i = 1 to listlen(widgets);
      rc = setniteml(objids,
   call notify('work1','_selectItem'
   rc = dellist(widgets);
   rc = dellist(objids);

See Also

_setSelection in the Widget class.

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.