Progress
Programming
Handbook


Attributes

The following attributes are the main attributes associated with the direct manipulation of widgets. Other attributes are also associated with direct manipulation but apply solely to grids. For more information on these other attributes, see the "Grids" section.

Table 24–1: Direct-manipulation Attributes 
Attribute
Description
SELECTABLE
Set this attribute to TRUE if you want to allow the user to highlight a widget before moving or resizing it. This attribute applies to frames and to all field-level widgets.
MOVABLE
Set this attribute to TRUE to allow the user to move a widget. This attribute applies to frames and to all field-level widgets.
RESIZABLE
Set this attribute to TRUE to allow the user to resize a widget. This attribute applies to frames and to all field-level widgets.
BOX–SELECTABLE
Set this attribute to TRUE if you want to allow the user to use selection boxes to select and deselect widgets within a frame. (For more information on selection boxes, see the "Box Selecting" section.) This attribute applies only to frames.
SELECTED
When the user marks a widget with a mouse, Progress sets this attribute to TRUE. You can also explicitly set this attribute within your code. Progress sets this attribute to FALSE when the user unmarks the widget. This attribute applies to frames and to all field-level widgets.
MANUAL–HIGHLIGHT
Set this attribute to TRUE if you want to use a custom highlight graphic design. When the user selects a widget, Progress highlights the widget by placing a box around that widget by default. By setting this attribute to TRUE, you can override the Progress default and highlighting the widget yourself.
NUM–SELECTED–WIDGETS
Use this read-only attribute to determine how many frames and dialog boxes are selected in a window, or how many field-level widgets are selected in a frame or dialog box.

By default, all of these attributes are set to FALSE, except for NUM–SELECTED–WIDGETS, which is an integer and read-only. In addition to the attributes listed in Table 24–1, the GET–SELECTED–WIDGET( ) method allows you to access the widget handle of all selected widgets in a window, dialog box, or frame. For more information on this method, see the Progress Language Reference .

The following procedure illustrates how you might use some of these attributes.

p-dirman.p
DEFINE VARIABLE tmp AS INTEGER.
DEFINE RECTANGLE rect1 size-pixels 39 by 39 edge-pixels 3 no-fill.
DEFINE RECTANGLE rect2 size-pixels 40 by 40 edge-pixels 3 no-fill.
DEFINE RECTANGLE rect3 size-pixels 40 by 39 edge-pixels 3 no-fill.
DEFINE RECTANGLE rect4 size-pixels 39 by 40 edge-pixels 3 no-fill.
DEFINE BUTTON manipulable LABEL "Manipulable".

FORM SKIP (1) SPACE (2)  rect1 SPACE(9) manipulable
                         rect2 SPACE(2)  SKIP (1)
              SPACE(9)   rect3 SPACE(10)
                         rect4 SPACE(7)  SKIP(3)
                         "Cust-Num: " tmp SKIP(1)
WITH FRAME a ROW 3 CENTERED NO-LABELS TITLE "Manipulable Widgets".
FRAME a:BOX-SELECTABLE = YES.

rect1:SENSITIVE        IN FRAME A = YES.   /* All Properties sensitive */
rect1:SELECTABLE       IN FRAME A = YES.
rect1:MOVABLE          IN FRAME A = YES.
rect1:RESIZABLE        IN FRAME A = YES.

manipulable:SENSITIVE  IN FRAME A = YES.   /* All Properties sensitive */
manipulable:SELECTABLE IN FRAME A = YES.
manipulable:MOVABLE    IN FRAME A = YES.
manipulable:RESIZABLE  IN FRAME A = YES.

rect2:SENSITIVE        IN FRAME A = YES.   /* Movable, but not resizable */
rect2:SELECTABLE       IN FRAME A = YES.
rect2:MOVABLE          IN FRAME A = YES.
rect2:RESIZABLE        IN FRAME A = NO.

rect3:SENSITIVE        IN FRAME A = YES.   /* Resizable but not Movable */
rect3:SELECTABLE       IN FRAME A = YES.
rect3:MOVABLE          IN FRAME A = NO.
rect3:RESIZABLE        IN FRAME A = YES.

rect4:SENSITIVE        IN FRAME A = YES.   /* Not resizable or Movable */
rect4:SELECTABLE       IN FRAME A = YES.   /* but selectable           */
rect4:MOVABLE          IN FRAME A = NO.
rect4:RESIZABLE        IN FRAME A = NO.

ENABLE ALL WITH FRAME a.
WAIT-FOR GO OF FRAME a. 

If you set any of the writable attributes in Table 24–1 to TRUE, Progress assumes that you want the user to be able to perform direct manipulation on the widget. As a result, Progress interprets user mouse actions differently and gives higher priority to those mouse events that are associated with direct manipulation (see Table 24–2). For example, if you set a button’s SELECTABLE attribute to TRUE, the user cannot choose the button with a mouse. To choose the widget, the user must use the keyboard instead.

Table 24–2: Direct-manipulation Mouse Events 
SELECTION
START–RESIZE
DESELECTION
END–RESIZE
EMPTY–SELECTION
START–BOX–SELECTION
START–MOVE
END–BOX–SELECTION
END–MOVE


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