| superclass(es) | control |
| subclass(es) | edit - memo |
| description | The editControl class is an abstract base class for the edit and memo classes. It contains all shared methods that relate to managing an edit control. |
| see also | panel |
The options of an edit control can be queried by the methods alignLeft/1, alignCenter/1, alignRight/1, lowerCase/1, upperCase/1, password/1, wordWrap/1, wantENTER/1, readonly/1 and textChanged/1. The current range of characters selected can be retrieved by the method selection/2, the selected characters is returned by selection/1. Removing the current selection can be achived by calling the method cut/0 or deleteSelection/0, the current selection can be replaced by the method replaceSelection/1, removing all text is done if clearAll/0 is called. The selection can be set by putSelection/2 and selectAll/0. |
| func | Cut the current selected text from the edit control. The text is put on the clipboard. |
| pre | TRUE. |
| post | The control has no selected text anymore. |
| func | Clear all the text inside the control. |
| pre | TRUE. |
| post | The control contains no text. |
| func | Check if the text inside the control is left aligned. |
| pre | TRUE. |
| post | If the text is left aligned true is assigned to Output, else is false assigned. |
| func | Check if the control centers the text. |
| pre | TRUE. |
| post | If the text is centered true is assigned to Output, else is false assigned. |
| func | Check if the text inside the control is right aligned. |
| pre | TRUE. |
| post | If the text is right aligned true is assigned to Output, else is false assigned. |
| func | Check if the text inside the control is always converted to lowercase characters. |
| pre | TRUE. |
| post | If the text is always lowercase true is assigned to Output, else is false assigned. |
| func | Check if the text inside the control is always converted to lowercase characters. |
| pre | TRUE. |
| post | If the text is always lowercase true is assigned to Output, else is false assigned. |
| func | Check if all the text inside the control is displayed using the same character, this is useful for entering passwords as the actual characters of the entered are not displayed. |
| pre | TRUE. |
| post | If the control is suitable for entering passwords then is true assigned to Output, else is false assigned. |
| func | Check if the control breaks up lines that are too long by wrapping the words. |
| pre | TRUE. |
| post | If the control does word wrapping then is true assigned to Output, else is false assigned. |
| func | Check if the control respond to the pressing of the ENTER key or that it passes the key to it's parent window. If the ENTER key event is passed to the frame window then the frame closes itself. |
| pre | TRUE. |
| post | If the control uses the ENTER key event then true is assigned to Output, else false is assigned. |
| A memo control does not pass the ENTER key event to it's parent window. |
| func | Check if the control is read-only or not. A read-only control ignores all events from the user. |
| pre | TRUE. |
| post | If the control is read-only then true is assigned to Output, else false is assigned. |
| func | Make the control read-only or remove the read-only property. |
| pre | YesNo must contain true or false. |
| post | If YesNo was true the control was made read-only, else the text has become editable again. |
| func | Determine if the "text changed" flag was turned on or off. This internal flag is turned on if the user makes changes to the text or if the flag is set by the method putTextChanged/1. |
| pre | Output must contain true or false. |
| post | If Output was true the control was made read-only, else the text has become editable again. |
| func | Raise or lower the text changed flag of the edit control, if the user makes changes to the text of the control then this flag is set. |
| pre | YesNo must contain true or false. |
| post | If YesNo was true the flag was set, else the flag was reset. |
| func | Get the start and end index of the selection of the control, the index of the first character is 0. |
| pre | TRUE. |
| post | If there was no selection then Start and End both contain the position of the current point of insertion, else the Start variable contains the index of the first character of the selection and End the index of the last character of the selection. |
| func | Get the selected text from the control. |
| pre | TRUE. |
| post | If there was no selection then String is not assigned a value, else it is assigned the selected text. |
| func | Replace the selected text of the control by the contents of the variable String or insert the value of String into the text of the control. The current point of insertion of the control determines where the text is inserted. |
| pre | The String variable must contain a text value. |
| post | If there was no selection then the text was inserted before the first character of the edit control, else the selection of the control was replaced by the value of the variable String. |
| func | Put the selection of the control, the start and end index of the selection must be specified. The index of the first character is 0. |
| pre | The Start and End variables must contain an integer value. |
| post | The selection of the control was set to the range of characters specified by the contents of the variables Start and End. |
| func | Select all the text of the edit control. |
| pre | TRUE. |
| post | All the text of the control is selected. |
| func | Delete the selected text of the edit control. |
| pre | TRUE. |
| post | All the selected text of the control was selected. |
| func | Set a maximum on the number of characters that can be entered. |
| pre | The variable MaxNum must contain an integer value. |
| post | No more than MaxNum characters can be entered in the control. If the control already contains too much characters than no characters are deleted. If MaxNum was 0 the limit on the maximum number of characters was removed. |
| func | This callback event is executed when text is cut from the edit control. |
| pre | The variable Sender refers to the window from text is being cut. |
| post | TRUE. |
| func | This callback event is executed when text is copied from the edit control. |
| pre | The variable Sender refers to the window from which text is being copied. |
| post | TRUE. |
| func | This callback event is executed when text is pasted into an the edit control. |
| pre | The variable Sender refers to the window into which text is being pasted. |
| post | TRUE. |
| func | This callback event is executed when text is cleared inside an edit control. |
| pre | The variable Sender refers to the window from text is being cleared. |
| post | TRUE. |
| The difference between the onCut/1 event and this event is that this event is also executed when the method clearAll/0 is executed. |