## Document

### Description

The Document class implements a special window for displaying and editing text. It is equivalent to an ordinary Window with a built-in multi-line edit control.

The text displayed in the window is represented by the `text` property, and the font used by the `font` property. Other text-edit properties include `selection`, `seltext` and `canundo`. Related methods are `Cut`, `Clear`, `Paste` and `Undo`.

You can optionally install an `onChange` callback to detect when the user edits the text.

### Example

         ’DEMO_Document;DEMO
    [1]   © Sample function demonstrating use of the Document object
    [2]   DEMO„'Ś' ŚNEW 'Document' Ş DEMO.scale„3
    [3]   DEMO.title„'Document Example'
    [4]   DEMO.Font('Arial' 12 1)
    [5]   DEMO.Text 'You can edit this text (if you must).'
    [6]   DEMO.where„10 10
    [7]   DEMO.size„130 250
    [8]   ©
    [9]   © Wait for the user to close the window
    [10]  0 0˝ŚWE DEMO
         ’

### Properties

align anchors aquaadjust autodraw border canundo caption children class color data doublebuffered dragsource droptarget enabled events extent font maxsize menuimagelist methods minsize name opened pointer properties scale selection self seltext size sourceformats targetformats text tie units visible where winptr

### Methods

Clear Click Clienttoscreen Close Copy Create Cut Delete Focus Hide New Open Paint Paste Resize Screentoclient Send Set Show Trigger Undo Wait

### Callbacks

onChange onClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onFocus onHide onMenu onMouseDown onMouseMove onMouseUp onMove onOpen onPaint onResize onSend onShow onUnFocus

Topic: APLX Help : System Classes : List of Classes : Document

[ Previous | Next | Contents | Index ]