routine MULTLINE.CTRL given FIELD.ID, FORM.PTR yielding STATUS
''
'' AUTHOR: Steve Bailey
'' CREATED: 2-29-96
'' DESCRIPTION:
''     Program showing how to use the multi-line text box.
''

define FIELD.ID as a text variable
define FORM.PTR as a pointer variable
define STATUS   as integer variable

define BUFFER as a 1-dim text array

select case FIELD.ID
  case "SET TEXT"
    '' an array will hold the text of the multi-line text box
    reserve BUFFER(*) as 7
    let BUFFER(1) = "The big brown fox jumped"
    let BUFFER(2) = "over the unfortunate"
    let BUFFER(3) = "dog's back."
    let BUFFER(4) = ""
    let BUFFER(5) = "Now is the time for all"
    let BUFFER(6) = "good humans to come to"
    let BUFFER(7) = "the aid of their planet."

    let DARY.A(DFIELD.F("MULTLINE BOX", FORM.PTR)) = BUFFER(*)

    display DFIELD.F("MULTLINE BOX", FORM.PTR)

  case "GET TEXT"
    let BUFFER(*) = DARY.A(DFIELD.F("MULTLINE BOX", FORM.PTR))
    list BUFFER
  
  case "QUIT"
    let STATUS = 1

  default
endselect

return

End
