Kbase P70021: How to scroll to a specific browse column given its Label us
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  03/03/2004 |
|
Status: Unverified
GOAL:
How to scroll to a specific browse column given its Label using 4GL?
FIX:
The following sample 4GL code scrolls to the browse column labeled 'City':
DO:
DEFINE VARIABLE cLabel AS CHARACTER NO-UNDO.
DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hColumn AS HANDLE NO-UNDO.
ASSIGN
cLabel = 'City'
hBrowse = BROWSE-1:HANDLE IN FRAME DEFAULT-FRAME
hColumn = hBrowse:FIRST-COLUMN.
DO WHILE hColumn:LABEL <> cLabel AND VALID-HANDLE(hColumn):
i = i + 1.
APPLY "CURSOR-RIGHT":U TO hColumn.
hColumn = hColumn:NEXT-COLUMN.
END.
hBrowse:CURRENT-COLUMN = hColumn.
END.