PreviousNextIndex

CREATE widget statement

Creates a dynamic object, such as a widget object.

Note: Does not apply to SpeedScript programming.
Syntax

CREATE {     BUTTON  |  COMBO-BOX 
          |  CONTROL-FRAME  |  DIALOG-BOX 
          |  EDITOR  |  FILL-IN 
          |  FRAME  |  IMAGE 
          |  MENU  |  MENU-ITEM 
          |  RADIO-SET  |  RECTANGLE 
          |  SELECTION-LIST  |  SLIDER 
          |  SUB-MENU |  TEXT 
          |  TOGGLE-BOX |  WINDOW 
          |  VALUE ( string-expression ) 
       } handle [ IN WIDGET-POOL pool-name ] 
  [ ASSIGN { attribute = expression } ... ] 
  [ trigger-phrase ] 

VALUE ( string-expression )
handle
IN WIDGET-POOL pool-name
ASSIGN { attribute = expression } ...
trigger-phrase
Example

This procedure creates a dynamic button that displays a list of customer names:

r-dynbut.p
DEFINE VARIABLE but1 AS HANDLE NO-UNDO. 
DISPLAY "Dynamic Button Example" SKIP(3) WITH FRAME x SIDE-LABELS. 
OPEN QUERY all-custs FOR EACH Customer. 
GET FIRST all-custs. 
DISPLAY Customer.Name WITH FRAME x. 
CREATE BUTTON but1 ASSIGN 
  ROW       = 3 
  COLUMN    = 5 
  LABEL     = "Next Customer" 
  FRAME     = FRAME x:HANDLE 
  SENSITIVE = TRUE 
  VISIBLE   = TRUE 
  TRIGGERS: 
    ON CHOOSE DO: 
      GET NEXT all-custs. 
      DISPLAY Customer.Name WITH FRAME x.  
    END. 
  END TRIGGERS. 
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. 

Notes
See also

CREATE QUERY statement, CREATE WIDGET-POOL statement, DEFINE FRAME statement, DELETE WIDGET statement, DELETE WIDGET-POOL statement, Trigger phrase


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex