Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - medit() edit a memo field http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 medit()             Edit a memo field
------------------------------------------------------------------------------
 Declaration
   memo.hdr

 Syntax
   proc medit extern
   param       memo    mMemoField, ;
         value uint    uTop, ;
         value uint    uLeft, ;
         value uint    uBottom, ;
         value uint    uRight, ;
         value logical lDisplayOnly

 Arguments
   mMemoField is the memo to operate on.
   uTop is the top row of the display.
   uLeft is the leftmost column of the display.
   uBottom is the bottom row of the display.
   uRight is the rightmost of the display.
   lDisplayOnly specifies if the memo can only be viewed but not edited.

 Return
   None.

 Description
   The medit() function displays a memo field on the screen and optionally
   allows the operator to edit it. The first editable character position is
   at uTopRow, uLeftCol.

   The medit() procedure neither saves the screen before writing the memo
   nor draws a box. Use savescreen(), fill() and @ to to save
   an area of the screen and to draw a box.

   The memo field is opened and closed by the medit() procedure, therefore
   the application should not open and close a memo before/after editing.
   When the database is opened for shared use, the record must be locked
   via rlock() or arlock() for a successful update.

   See the Memo editor key table for a listing of medit() keys.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_medit
   vardef
      char cBuffer
   enddef
   open sTest index sIdxLN
   seek "Vanderbilt"                           // seek for a record
   if found()
      clear
      @ 1, 0 ?? recno(), sTest->firstname, sTest->lastname
      @ 3, 1 to 11, 79
      medit( sTest->notes, 4, 2, 10, 78, .f. ) // edit memo field
      mopen( sTest->notes, MO_READ )
      mgetln( sTest->notes, cBuffer )
      mclose( sTest->notes )
      @ 14, 1 ?? cBuffer                       // display input
   endif
   endproc

   proc main
   Test_medit()
   endproc

See Also: Memo editor key table mclose() mopen()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson