PreviousNextIndex

Format phrase

Specifies one or more attributes for a widget.

Syntax

[ at-phrase ] 
[ AS datatype | LIKE field ] 
[ ATTR-SPACE | NO-ATTR-SPACE ] 
[ AUTO-RETURN ] 
[ BGCOLOR expression ] 
[ BLANK ] 
[ COLON n | TO n ] 
[ COLUMN-LABEL label  ] 
[ DEBLANK ] 
[ DCOLOR expression ] 
[ DISABLE-AUTO-ZAP ] 
[ FGCOLOR expression ] 
[ FONT expression ] 
[ FORMAT string ] 
[ HELP string ] 
[ LABEL label [ , label ] ... | NO-LABELS ] 
[ NO-TAB-STOP ] 
[ PFCOLOR expression ] 
[ VALIDATE ( condition , msg-expression ) ] 
[ view-as-phrase ] 
[ WIDGET-ID id-number ] 

at-phrase
AS datatype
LIKE field
ATTR-SPACE | NO-ATTR-SPACE
AUTO-RETURN
BGCOLOR expression
BLANK
COLON n
TO n
COLUMN-LABEL label
DEBLANK
DCOLOR expression
DISABLE-AUTO-ZAP
FGCOLOR expression
FONT expression
FORMAT string
HELP string
LABEL label [ , label ] . . .
NO-LABELS
NO-TAB-STOP
PFCOLOR expression
VALIDATE ( condition, msg-expression )
view-as-phrase
WIDGET-ID id-number
Example

This procedure lets the user update Customer records after entering the password “secret.” The format phrase on the Phone field describes the display format of that field.

r-frmat.p
DEFINE VARIABLE password AS CHARACTER NO-UNDO. 
UPDATE password FORMAT "x(6)" BLANK 
  VALIDATE(password = "secret", "Sorry, wrong password") 
  HELP "Maybe the password is ’secret’ !" 
  WITH FRAME passw CENTERED SIDE-LABELS. 
HIDE FRAME passw. 
REPEAT: 
  PROMPT-FOR Customer.CustNum COLON 20. 
  FIND Customer USING Customer.CustNum. 
  UPDATE 
    Customer.Name LABEL "Customer Name" COLON 20 
      VALIDATE(Customer.Name NE "", "Please enter a name") 
    Customer.Address HELP "Please enter two lines of address" 
      COLON 20 LABEL "Address" 
    Customer.Address2 NO-LABEL COLON 20 
    Customer.City COLON 20 
    Customer.State COLON 20 
    Customer.PostalCode COLON 20 SKIP(3) 
    Customer.Phone AT 5 FORMAT "(999) 999-9999" 
    Customer.Contact TO 60 
    WITH CENTERED SIDE-LABELS. 
END. 

Notes
See also

FORM statement, Frame phrase


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex