|
|
|
|
- Overview
- Displaying information in an Edit control
- Retrieving the value entered in an Edit control
- Properties specific to Edit controls
- Special case: Upload Edit control
Handling an Edit control programmatically
You can handle Edit controls programmatically. To do so, use the variable that corresponds to the Edit control in the code. This variable is the name of the control itself. The type of variable depends on the type of Edit control (numeric, text, currency, etc.).
Displaying information in an Edit control To display information in an Edit control, simply assign a value. For example: - direct assignment:
EDT_CustomerLastName = "Doe"
- assignment using a variable:
EDT_LASTNAME = Customer_LastName
- assignment by calculation:
EDT_LASTNAME = NoSpace(CUSTOMER.LASTNAME) + TAB + NoSpace(CUSTOMER.FIRSTNAME)
Remark: If the control is associated with a data file item, the assignment is automatically performed via: You can also use the following notation: CustomerLastName = CUSTOMER.LASTNAME. For more details, see Binding an Edit control to an item. Retrieving the value entered in an Edit control To retrieve the content of an Edit control: - perform a simple assignment.
For example:
CurrentEditContent = EDT_EDIT1
- retrieve part of the information.
For example:
Initial = Left(EDT_LastName, 1) Initial = EDT_LastName[[1]]
- use the Value property
Remark: If the control is bound to a data file item, the value entered in the control is automatically updated in the data source using: You can also use the following notation: CUSTOMER.LASTNAME = Edit1. For more details, see Binding an Edit control to an item. Properties specific to Edit controls The following properties allow you to define the characteristics of Edit controls. | | Any type of edit control | HorizontalAlignment | Gets and sets the horizontal alignment of an Edit control. | VerticalAlignment | Gets and sets the vertical alignment of an Edit control. | Cursor | Gets and sets the position of the mouse cursor in an Edit control. | DndTarget | Gets and sets the behavior of the target control during a drag and drop operation. | DndSource | Gets and sets the behavior of the source control during a drag and drop operation. | Ellipsis | Gets and sets the type of ellipsis in an Edit control. | CursorEnd | Gets and sets the end position of a selection made with the cursor. | InputMask | Gets and sets the input mask. | LeftIndent | Gets and sets the left indent of the text in the Edit control. | RichEdit | Determines if a control supports RTF, and enables or disables RTF support for that control. | SelectedText | Gets and changes the text selected in an Edit control. | InputType | Gets the type of Edit control. | Text Edit controls only | DeleteButton | Determines whether or not the control contains a Delete button. | AutomaticLink | Gets and sets the link detection mode in multiline Edit controls. | Password | Determines if an Edit control is of type "Password". | Multiline | Determines if an Edit control supports multiple lines of text. | AutoLineWrap | Determines if a multiline Edit control supports automatic line wrapping. | Currency + Euro Edit controls only | DisplayCurrency | Gets and sets the currency used to display or enter a value in a "Currency + Euro" Edit control. | MemoryCurrency | Gets and sets the currency used when handling a "Currency + Euro" Edit control programmatically. | Duration and Numeric Edit controls | MaxValue | Gets and sets the upper bound of values in an Edit control. | MinValue | Gets and sets the lower bound of values in an Edit control. |
For a complete list of WLanguage properties that can be used with Edit controls, see Properties associated with Edit controls. Special case: Upload Edit control
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|