PreviousNextIndex

EDITOR phrase

Specifies that a field or variable is displayed as a text editor widget. This is especially useful for long text (CHARACTER and LONGCHAR) fields. The EDITOR phrase is an option of the VIEW-AS phrase.

Syntax

EDITOR 
  {    size-phrase 
     | INNER-CHARS characters INNER-LINES lines 
  } 
  [ BUFFER-CHARS chars ] 
  [ BUFFER-LINES lines ] 
  [ LARGE ] 
  [ MAX-CHARS characters ] 
  [ NO-BOX ] 
  [ NO-WORD-WRAP ] 
  [ SCROLLBAR-HORIZONTAL ] 
  [ SCROLLBAR-VERTICAL ] 
  [ TOOLTIP tooltip ] 

size-phrase
INNER-CHARS chars INNER-LINES lines
BUFFER-CHARS chars
BUFFER-LINES lines
LARGE
MAX-CHARS characters
NO-BOX
NO-WORD-WRAP
SCROLLBAR-HORIZONTAL
SCROLLBAR-VERTICAL
TOOLTIP tooltip
Example

The following example uses two editor widgets. The Item.CatDescription field is viewed as an EDITOR in the item-info frame and the variable my_clipbd is viewed as an EDITOR in the clip frame. Use the EDITOR functions provided by your interface environment to copy text from CatDescription into my_clipbd. You can then subsequently copy that text into the CatDescription field of another item.

r-vaedit.p  
DEFINE VARIABLE my_clipbd AS CHARACTER NO-UNDO 
  VIEW-AS EDITOR SIZE 60 BY 6 SCROLLBAR-VERTICAL LABEL "Scratch Pad". 
DEFINE BUTTON b_quit LABEL "Quit" AUTO-ENDKEY. 
FORM 
  Item.ItemNum 
  Item.ItemName 
  Item.Price 
  Item.OnHand 
  Item.Allocated 
  Item.ReOrder 
  Item.OnOrder 
  Item.CatPage 
  Item.CatDescription VIEW-AS EDITOR SIZE 35 BY 3 SCROLLBAR-VERTICAL 
  WITH FRAME item-info 1 DOWN ROW 1 CENTERED SIDE-LABELS  
  TITLE "Update Item Category Description". 
FORM my_clipbd WITH FRAME clip. 
DEFINE FRAME butt-frame b_quit  
  WITH CENTERED ROW 18. 
ON GO OF Item.ItemNum DO: 
  FIND Item USING Item.ItemNum EXCLUSIVE-LOCK. 
  DISPLAY Item WITH FRAME item-info. 
  ENABLE Item.CatDescription WITH FRAME item-info. 
  ENABLE my_clipbd WITH FRAME clip. 
END. 
ON GO OF Item.CatDescription DO: 
  ASSIGN Item.CatDescription. 
  CLEAR FRAME item-info. 
  DISABLE Item.CatDescription WITH FRAME item-info. 
END. 
ENABLE Item.ItemNum WITH FRAME item-info. 
ENABLE b_quit WITH FRAME butt-frame. 
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. 

Notes
See also

SIZE phrase, VIEW-AS phrase


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex