Progress
Language Reference


SELF System Handle

Interfaces
OS
SpeedScript
All
All
Yes

A handle to the object or widget associated with the currently executing user-interface trigger or event procedure.

SYNTAX

SELF [ :attribute ] 

attribute

An attribute of the object or widget associated with the trigger or event procedure. The specific attributes available depend on the type of the object or widget. You can determine the object or widget type by examining the SELF:TYPE attribute.

EXAMPLE

The following example uses the SELF handle to display the starting and ending positions of an object you move.

r-self.p
DEFINE BUTTON b_quit LABEL "Quit"
  TRIGGERS:
    ON CHOOSE QUIT.
  END.

DEFINE VARIABLE x AS CHAR INIT "MOVE ME".

DEFINE FRAME move
  x NO-LABEL
  WITH SIZE 80 BY 10 TITLE "Move/Resize Widget".

ASSIGN x:MOVABLE = TRUE
       x:SELECTABLE = TRUE.

DEFINE FRAME butt-frame
  b_quit
  WITH CENTERED ROW SCREEN-LINES - 1.
  
ON END-MOVE OF x IN FRAME move
  DISPLAY 
    SELF:FRAME-ROW
    SELF:FRAME-COL
    WITH FRAME end-info CENTERED ROW 14 TITLE "End Position".
     
ON START-MOVE OF x IN FRAME move
  DISPLAY 
    SELF:FRAME-ROW
    SELF:FRAME-COL 
    WITH FRAME info CENTERED ROW 12 TITLE "Start Position".    
  
ENABLE b_quit WITH FRAME butt-frame.
DISPLAY x WITH FRAME move.
ENABLE x WITH FRAME move.

WAIT-FOR CHOOSE OF b_quit IN FRAME butt-frame FOCUS x. 

NOTES

SEE ALSO

Asynchronous Request Object Handle, COM-SELF System Handle, FOCUS System Handle, LAST-EVENT System Handle


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095