Kbase 15610: Setting focus from one SmartWindow to another Smartwindow
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Setting focus from one SmartWindow to another Smartwindow
4GL developers often ask the question how to set focus from one
SmartWindow to a widget in another SmartWindow. Consider the
following set-up:
- SmartWindow1 containing a fill-in widget (Fill-in-1) and an
instantiation of a second SmartWindow (SmartWindow2) on page 0
- SmartWindow2 containing a fill-in widget (Fill-in-2)
When one runs SmartWindow1 both SmartWindow1 and SmartWindow2
are activated and focus will be on the SmartWindow2.
The issue here is to get focus back to the fill-in widget in
SmartWindow1. A simple "APPLY 'ENTRY' TO Fill-in-1 IN FRAME
{&FRAME-NAME} in local-initialize of SmartWindow1 will not do
the job. The trick is to set "CURRENT-WINDOW = {&WINDOW-NAME}" just
before the "APPLY 'ENTRY' TO Fill-in-1" in local-initialize of
SmartWindow1. If you don't do this and the widget you're applying
focus to is not in the current window (normally the last window
created), then nothing visible happens.
NOTE:
The behavior of the 'apply-entry' ADM method may be modified in
a future release to incorporate setting the CURRENT-WINDOW handle,
although this is not definite at this time.
Modified 12-SEP-96
Progress Software Technical Support Note # 15610