Progress
Language Tutorial
for Character
Enabling and Disabling Widgets
As you’ve seen in previous examples, you use the ENABLE and DISABLE statements to turn widgets on and off. Typically, when you present an interface, you enable all the widgets in that interface. At other times, some widgets don’t have to be enabled unless special conditions are met.
Follow these steps for a demonstration of how you can enable and disable widgets during run time:
- Open
lt-03-08.p
.- Choose Compile
Run. The interface shown below appears. Note that buttons #1 and Exit are enabled, and #2 is disabled:
![]()
- Choose the first button. The second button becomes enabled and the first becomes disabled.
- Choose the second button. The first button becomes enabled again and the second button becomes disabled. You can repeat this process as many times as you like.
- Choose Exit to end the procedure.
- Press SPACEBAR to return to the Procedure Editor.
Here is the code that created the display:
The effect of the ENABLE and DISABLE statements at points 1 and 2 is that only one of the buttons can be active at a time. By selectively enabling and disabling parts of the interface, you help the user focus on the parts of the interface that are important at a given moment.
This is a partial syntax for the ENABLE statement.
This is a partial syntax for the DISABLE statement.
The following table describes the important elements of the ENABLE and DISABLE statements:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |