|
|
|
|
|
- Overview
- Displaying information in an Edit control
- Retrieving the value entered in an Edit control
- Properties specific to Edit controls
- Special case: Edit control type UPLOAD (retained for compatibility)
Manipulating Edit controls programmatically
You can manipulate 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 (Numerical, text, monetary, 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 field is associated with an item in a data file, assignment is automatically performed using: You can also use the following notation: CustomerLastName = CUSTOMER.LASTNAME. For more details, see Linking 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
- recover part of the information.
For example:
Initial = Left(SAI_Name, 1)
Initial = SAI_Name[[1]]
- use the Value property
Note If the Edit control is associated with an item in a data file, the value entered is automatically retrieved using: You can also use the following notation: CUSTOMER.LASTNAME = Edit1. For more details, see Linking 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 manipulating 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 Edit control properties. Special case: Edit control type UPLOAD (retained for compatibility)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|