Progress
Language Tutorial
for Character
Manipulating Widget Attributes
Widgets have many attributes that you can access and change even when the widget is visible on screen. By changing attributes, you can change the appearance or function of the widget. For example, you might want to:
Follow these steps for a demonstration of attributes in expressions:
- Open
lt-05-02.p
and run it. The interface is shown below:
![]()
- Experiment by choosing from the Up, Down, Left, Right button group. The Reset button moves. You can move the button around within the frame, but can’t move the button beyond the borders of the frame. The ROW and COL attributes, which the buttons manipulate, position a widget within a frame.
- Choose the Reset button to move it back to its starting location.
- Choose Exit, then press SPACEBAR to return to the Procedure Editor.
Here is the code that created the display:
The following notes help explain the code:
- Choosing the Reset button moves the widget back to its starting location. The trigger assigns the constant values that correspond to the original coordinates to the ROW and COL attributes.
- This trigger moves the Reset button up one row by decrementing ROW.
- This trigger moves the Reset button down one row by incrementing ROW.
- This trigger moves the Reset button right one column by incrementing COL.
- This trigger moves the Reset button left one column by decrementing COL.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |