PreviousNextIndex

DEFINE RECTANGLE statement

Defines a rectangle widget that is created at compile time for use within a single procedure or class.

Note: Does not apply to SpeedScript programming.
Syntax

DEFINE [ PRIVATE ] RECTANGLE rectangle [ LIKE rectangle2 ] 
  [ NO-FILL ] 
  [ { EDGE-CHARS width } | { EDGE-PIXELS width } ]  
  [ DCOLOR expression ] 
  [ BGCOLOR expression ] 
  [ FGCOLOR expression ] 
  [ GRAPHIC-EDGE ] 
  [ PFCOLOR expression ] 
  [ ROUNDED ] 
  [ GROUP-BOX ] 
  [ size-phrase ] 
  [ TOOLTIP tooltip ] 
  { [ trigger-phrase ] } 

[ PRIVATE ] RECTANGLE rectangle
RECTANGLE rectangle
LIKE rectangle2
NO-FILL
EDGE-CHARS width
EDGE-PIXELS width
DCOLOR expression
BGCOLOR expression
FGCOLOR expression
GRAPHIC-EDGE
PFCOLOR expression
ROUNDED
GROUP-BOX
size-phrase
TOOLTIP tooltip
trigger-phrase
Example

The following example uses a set of thin rectangles as lines to create graphic columns within a frame background:

r-bkgrnd.p
DEFINE VARIABLE item-tot AS DECIMAL NO-UNDO LABEL "Value". 
DEFINE RECTANGLE vline1 SIZE .4 BY 5 EDGE-PIXELS 2. 
DEFINE RECTANGLE vline2 LIKE vline1. 
DEFINE RECTANGLE vline3 LIKE vline1. 
DEFINE RECTANGLE vline4 LIKE vline1. 
DEFINE RECTANGLE vline5 LIKE vline1. 
DEFINE RECTANGLE vline6 LIKE vline1. 
DEFINE RECTANGLE hline SIZE 78 BY .1 EDGE-PIXELS 2. 
DEFINE FRAME item-info 
  Item.ItemNum 
  Item.ItemName 
  Item.OnHand 
  Item.ReOrder 
  Item.OnOrder 
  Item.Price 
  item-tot 
  BACKGROUND SKIP(1) hline 
    vline1 AT 9 
    vline2 AT 25 
    vline3 AT 33 
    vline4 AT 42 
    vline5 AT 51 
    vline6 AT 65 
  WITH TITLE "Inventory Current Value" CENTERED USE-TEXT 5 DOWN. 
   
FOR EACH Item NO-LOCK WITH FRAME item-info: 
  DISPLAY  
    Item.ItemNum 
    Item.ItemName 
    Item.OnHand 
    Item.ReOrder 
    Item.OnOrder 
    Item.Price 
    Item.OnHand * Item.Price @ item-tot. 

Notes
See also

Class-based data member access, FORM statement


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex