Chapter Contents |
Previous |
Next |
Widget Class: _setSelection |
Syntax | |
Details |
Syntax |
objectName._setSelection( status, color ); |
Argument | Type | Use | Description |
---|---|---|---|
status | Character | Input | specifies a value indicating the status of the widget: ON if selected, OFF if not selected |
color | Character | Input |
Details |
The _setSelection method is used by the work area object and the extended table object. When you select an object in a work area, the object is sent a _setSelection method with a status of ON. The object that was previously selected in the work area is sent a _setSelection with a status of OFF. Both the selected object and the previously selected object have their border colors changed to indicate their selection status. To achieve a different visual appearance, you could override the _setSelection method and change the object's background color or border title.
For extended table objects, the _setSelection method is automatically called from the GETROW section of the SCL program to update the selection status of a widget. By default, when a row is selected, the border color is changed to the selection color. When a row is unselected, the region's original border color is restored. For example, suppose you have an extended table with a logical row that consists of obj1 and obj2. The table can display four rows. If the user selects row 2, the _selectRow method and the PUTROW block will run for row 2. When the Frame entry is redisplayed, the following processing takes place:
Example
The following example is an overridden _setSelection method. Instead of changing the default behavior of the region's border color, this example changes the region's title.
SEL: method status color $; if(status='ON') then _self_._setBorderTitle(selected); else _self_._setBorderTitle(unselected); endmethod;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.