Progress
Language Tutorial
for Windows
Fill-in Field Events
When an enabled fill-in field appears on screen, it can accept a whole range of events. The fill-in’s default response to most events will be exactly what you intend, requiring no programming on your part. The fill-in field:
- Accepts input focus by way of the navigation key functions (like TAB) or the mouse
- Responds to the universal key functions (like GO or HELP)
- Accepts input from character keys, as governed by the format string
- Allows the user to move the text cursor within the field with the cursor keys or the mouse
- Allows the user to edit the field with the standard field editing keys of the native environment
- Responds to ENTRY and LEAVE triggers
ENTRY and LEAVE Event Functions
The ENTRY and LEAVE event functions are useful for attaching functionality to the widget. ENTRY executes when a widget receives input focus, while LEAVE executes when input focus moves from a widget. Use ENTRY when you need to do something before the user manipulates the widget. For example, you might want to issue a cautionary message to the user. Use LEAVE when you want to manipulate the widget after the user finishes with it. For example, you might want to update other widgets in the display based upon the new input.
Follow these steps to use ENTRY and LEAVE:
- Open
lt-07-04.p
and run it. The following display appears:
![]()
- Press TAB. Notice the message that appears in the message area. A trigger attached to ENTRY displays this message.
- Press TAB again. Another message appears: “Hey, where’s the tip!” A trigger attached to LEAVE displays this message.
- Choose Exit, then press SPACEBAR to return to the Procedure Editor.
Here is the code that created this interface:
As you can see at points 1 and 2, simple triggers on ENTRY and LEAVE are all that you need to extend the functionality of the widget.
NOTE: LEAVE does not execute when you switch focus between windows or on high-level event functions, such as GO or menu mnemonics.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |