Class Edit
Inheritance
WinControl | Edit 🡄 WinControl 🡄 Control 🡄 Component 🡄 Object |
Properties
OnChange | The function to call when the editfield is changed. |
OnKeyDown | The function to call for the KeyDown event. |
OnKeyPress | The function to call for the KeyPress event. |
OnKeyUp | The function to call for the KeyUp event. |
SelLength | The length of the current selection (readonly). |
SelStart | The starting index of the current selection (zero-indexed, readonly). |
SelText | The current selected contents of the edit field (readonly). |
Text | The current contents of the editfield. |
Methods
Creation
createEdit ( owner ) | Creates an Edit class object which belongs to the given owner. |
Inheritance
- WinControl
- Edit 🡄 WinControl 🡄 Control 🡄 Component 🡄 Object
Properties
- OnChange
-
The function to call when the editfield is changed.
Type:
function - OnKeyDown
-
The function to call for the KeyDown event.
Type:
function - OnKeyPress
-
The function to call for the KeyPress event.
Type:
function - OnKeyUp
-
The function to call for the KeyUp event.
Type:
function - SelLength
-
The length of the current selection (readonly).
Type:
number - SelStart
-
The starting index of the current selection (zero-indexed, readonly).
Type:
number - SelText
-
The current selected contents of the edit field (readonly).
Type:
- Text
-
The current contents of the editfield.
Type:
Methods
- clear ()
- clearSelection ()
- copyToClipboard ()
- cutToClipboard ()
- getOnChange ()
-
Returns:
-
function
- getOnKeyDown ()
-
Returns:
-
function
- getOnKeyPress ()
-
Returns:
-
function
- getOnKeyUp ()
-
Returns:
-
function
- getSelLength ()
- getSelStart ()
- getSelText ()
- pasteFromClipboard ()
- select ( start, length )
-
Parameters:
- start
- length (optional)
- selectAll ()
- selectText ( start, length )
-
Set the control's current selection.
If no length is specified, selects everything after start.
Parameters:
- start
- length (optional)
- setOnChange ( onchange )
-
Parameters:
- onchange function
- setOnKeyDown ( onkeydown )
-
Parameters:
- onkeydown function
- setOnKeyPress ( onkeypress )
-
Parameters:
- onkeypress function
- setOnKeyUp ( onkeyup )
-
Parameters:
- onkeyup function
Creation
- createEdit ( owner )
-
Creates an Edit class object which belongs to the given owner.
Owner can be any object inherited from WinControl.
Parameters:
- owner WinControl
Returns: