Documentation for Win32lib v0.60.6
Table of Contents

Edit Control

These are routines that let you inspect and alter attributes of the text edit controls


Such as EditText, MleText and RichEdit.

  • func autoSelect( object id, integer Flag )   Turns on and off an edit control's auto-selection property.
  • proc clear( object )    Clear selected text from object.
  • proc copy( object )    Copy any selected text from object and place in the clipboard.
  • proc cut( object )    Cut any selected text from object and place in the clipboard.
  • proc limitText( object, size )   Limits the amount of text a user can enter into an Edit control.
  • proc paste( object )    Paste text from the clipboard to object.
  • proc undo( object )    Undo last edit in object.

    Documentation for Win32lib v0.60.6
    Table of Contents

    [func]
    autoSelect
    ( object id, integer Flag )

    Turns on and off an edit control's auto-selection property.

    Returns: OBJECT: Current AutoSelect status.

    Category: Edit Control

    If flag is w32True, the edit control id is set to have Auto-Selection, otherwise it is set off.

    If id is a single control id, then the return value is a integer.
    If id is a sequence of controls, then the return value is a sequence containing one status flag per control referenced in id.

    id can be either a single control id or a list of ids in a sequence.

    Auto-selection means that when the edit control gets focus, all its contents is selected automatically for you.

    Example:

          sequence asv
          fldName = create( EditText, "", aWindow, x1, y1, width1, height1, 0 )
          fldAddress = create( EditText, "", aWindow, x1, y2, width1, height1, 0 )
          asv = autoSelect({fldName, fldAddress}, w32True)
    

    See Also: clear, copy, cut, limitText, paste, undo


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    clear
    ( object )

    Clear selected text from object.

    Category: Edit Control

    Example:

              -- clear selected text in TheTextEdit
               clear( TheTextEdit )
    

    See Also: autoSelect, copy, cut, limitText, paste, undo


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    copy
    ( object )

    Copy any selected text from object and place in the clipboard.

    Category: Edit Control

    Example:

              -- copy text from TheTextEdit into the clipboard
               copy( TheTextEdit )
    

    See Also: autoSelect, clear, cut, limitText, paste, undo


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    cut
    ( object )

    Cut any selected text from object and place in the clipboard.

    Category: Edit Control

    Example:

              -- cut text from TheTextEdit
               cut( TheTextEdit )
    

    See Also: autoSelect, clear, copy, limitText, paste, undo


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    limitText
    ( object, size )

    Limits the amount of text a user can enter into an Edit control.

    Category: Edit Control

    Example:

          aTextBox = create( EditText, "", aWindow, x1, y1, width1, height1, 0 )
          aEditor  = create( RichEdit, "", aWindow, x2, y2, width2, height2, 0 )
          limitText( aTextBox, 50 )   -- No more than 50 characters allowed.
          limitText( aEditor, 50000 ) -- No more than 50,000 characters allowed.
    

    See Also: autoSelect, clear, copy, cut, paste, undo


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    paste
    ( object )

    Paste text from the clipboard to object.

    Category: Edit Control

    Example:

              -- paste text from clipboard to TheTextEdit
               paste( TheTextEdit )
    

    See Also: autoSelect, clear, copy, cut, limitText, undo


    Documentation for Win32lib v0.60.6
    Table of Contents

    [proc]
    undo
    ( object )

    Undo last edit in object.

    Category: Edit Control

    Example:

              -- undo last edit in TheTextEdit
               undo( TheTextEdit )
    

    See Also: autoSelect, clear, copy, cut, limitText, paste