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: charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
See Also: autoSelect, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
Example:
-- clear selected text in TheTextEdit clear( TheTextEdit )
See Also: autoSelect, charToIndex, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
Example:
-- copy text from TheTextEdit into the clipboard copy( TheTextEdit )
See Also: autoSelect, charToIndex, clear, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
Example:
-- cut text from TheTextEdit cut( TheTextEdit )
See Also: autoSelect, charToIndex, clear, copy, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
line is either a single line or a {lower,upper} range of lines to delete. No action is taken if the line number is invalid. If the deleted lines overlap the selection, the selection will be shortened accordingly.
See Also: autoSelect, charToIndex, clear, copy, cut, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
x and y are client screen coordinates relative to id. If a position refers to past end of line whitespace, the information returned is relative to the last character of that line. If it is past the last character in the control, the returned information is relative to that character. You can check for this condition by calling getCharacterPosition() and comparing the result to the initial position.
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
If flag is zero, this will be a fast estimate, slightly larger than the actual count. Passing a nonzero flag will return the actual count, accurate but slower.
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
As a special case, if col is 0, then line is a character index.
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
id must refer to an edit or rich edit control; otherwise, the function returns 0. If number is 0 or less, the text of current line in the control is returned. The current line is the one where the selection starts, if any, or the one where the insertion point currently is. If flag is w32False, the length is returned; otherwise, the text of the line is returned.
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getVisibleLines, indexToLine, insertTextAt, limitText, paste, undo
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, indexToLine, insertTextAt, limitText, paste, undo
Note that, if word wrap was set using the EM_SETTARGETDEVICE message, the returned information is not reliable if the index falls into the wrapped part of a line.
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, insertTextAt, limitText, paste, undo
If pos is an atom, text will be appended to the control's text. Otherwise, it specifies the insertion point as {line,column}. If the insertion point is inside the selection, the selection will be enlarged and contains the inserted text as well. Otherwise, selection is preserved.
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, limitText, paste, undo
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, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, paste, undo
Example:
-- paste text from clipboard to TheTextEdit paste( TheTextEdit )
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, undo
Example:
-- undo last edit in TheTextEdit undo( TheTextEdit )
See Also: autoSelect, charToIndex, clear, copy, cut, deleteLine, getCharacterAt, getCharacterCount, getCharacterPosition, getLine, getVisibleLines, indexToLine, insertTextAt, limitText, paste