Kbase P138326: 4GL/ABL: How to list the TAB-POSITION of all widgets of a given frame?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/5/2008 |
|
Status: Unverified
GOAL:
4GL/ABL: How to list the TAB-POSITION of all widgets of a given frame?
GOAL:
How to walk the widget tree of a FRAME and get the NAME, TYPE and TAB-POSITION attributes of all its child widgets.
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
The following code, which may be placed behind a 'CHOOSE' button trigger, walks the widget tree of the current frame and lists the NAME, TYPE and TAB-POSITION attributes of all its true child widgets. Notice, that the NAME and TAB-POSITION attributes of the LITERAL widgets have the unknown value ?:
DEFINE VARIABLE hFrame AS HANDLE NO-UNDO.
DEFINE VARIABLE hFieldGroup AS HANDLE NO-UNDO.
DEFINE VARIABLE hFirstWidget AS HANDLE NO-UNDO.
DEFINE VARIABLE hCurrentWidget AS HANDLE NO-UNDO.
ASSIGN
hFrame = FRAME {&FRAME-NAME}:HANDLE
hFieldGroup = hFrame:FIRST-CHILD /* The FIELD-GROUP widget handle */
hFirstWidget = hFieldGroup:FIRST-CHILD /* First true child widget handle*/
hCurrentWidget = hFirstWidget.
DO WHILE VALID-HANDLE (hCurrentWidget):
MESSAGE
"TYPE:~t~t" hCurrentWidget:TYPE "~n"
"NAME:~t~t"hCurrentWidget:NAME "~n"
"TAB-POSITION:~t" hCurrentWidget:TAB-POSITION
VIEW-AS ALERT-BOX INFO BUTTONS OK.
hCurrentWidget = hCurrentWidget:NEXT-SIBLING.
END. /* DO WHILE */