Language Reference Guide : C. Generated User Classes : Edit_Object User Class
 
Share this page          
Edit_Object User Class
The Edit_Object user class supports the text editor functions of the edit_control field template. It provides handlers for the standard File and Edit menu commands, and interacts with the system clipboard, where possible.
For methods that return integers (not null), the return values are ER_OK or ER_FAIL. For the OnFileClose function, ER_FAIL indicates that the current operation should be aborted, since otherwise changes will be lost. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.
The Edit_Object's Setup method accepts three optional arguments, which you can add to the Setup call in the edit control's initialize script to customize your instance of the field. For example:
initialize =
begin
     $_CurFld.Setup(editframe = CurFrame,
          editfield = field($_CurFld.EditField),
          editfile  = 'c:\ingres\myfile.txt',
          titlebar  = TRUE);
end
Your menu or toolbar handlers should call the appropriate Edit_Object File and Edit methods.
Inherits From
UserObject Class
Inherited By
None
Methods
OnEditCopy
OnEditCut
OnEditPaste
OnFileClose
OnFileNew
OnFileOpen
OnFileSave
OnFileSaveAs
Setup