|
- Edit control overview
- Create an "Edit" control
- Main characteristics of an Edit control
- Type of an Edit control
- Types and masks
- Displaying a hint text in an Edit control
- Other important characteristics
- Edit control style
- Converting an Edit control to a Static control
The Edit control allows users to enter data. This control can also be used to view information.
Create an "Edit" control To create an "Edit" control: - On the "Creation" tab, in the "Usual controls" group, click
. - Click where the control will be created in the window or page. The control appears in the editor.
Remark: You can also choose an Edit control from a list of preset controls by expanding "Edit". The list of available controls is displayed with the project skin template. Simply click the control you want to create in the editor. To view the control characteristics, select "Description" in the context menu. Report editor: You also have the ability to create an edit control in a report. For more details, see Input in the reports. Main characteristics of an Edit control Type of an Edit control The format of an Edit control depends on the type of information displayed or entered. The following types of edit controls can be created: - Text to display or enter a character string (name, address, etc.).
- Multiline text to display or enter several lines separated by a "Carriage Return".
RTF text to enter and display information in RTF. - Password: when typing information, all characters will be replaced with asterisks on the screen.
- Numeric to display or enter a numeric value (weight, etc.). The "+++" characters are displayed if the control is not large enough to display the entire number.
- Currency to display or enter monetary values.
- Currency + Euro to manage prices for example
- Date to display or enter dates.
- Time to enter or display times.
- Duration to enter or display durations.
- Text tokens to manage an input with tokens.
Types and masks - Input mask: Several input masks can be used for each type of Edit control.
These input masks are multilingual: different input masks can be selected according to the runtime language of the project. For more details, see Multiple languages in the controls. These input masks can be modified programmatically with the InputMask property.
 Display mask: You can also define display masks for some types of controls (Currency, Currency + Euro, Date, Time and Duration). These display masks are used to define the characteristics of the control when it is not in edit. For example, a Date control can have: - the input mask: "DD/MM/YYYY".
- the display mask: "DDDD DD MMMM YYYY" (long date format).
Display masks can be multilingual and can be modified programmatically with the DisplayMask property.
Edit control style The "Style" tab allows you to customize the appearance of all the elements in the Edit control. You can apply styles to different elements: - The control caption: You can define the text font, position, color, etc.
- The outside border.
- The text in the input area.
- The input area: For example, you can define the background color, border color, ...
Remark: The "Margins" button allows you to set the margins between the text and the border of of the input area. - The hint text.
- The tokens (if any).
- Invalid or required input indicators.
- ...
Converting an Edit control to a Static control
Related Examples:
|
Unit examples (WINDEV): The edit control
[ + ] Using an edit control.
|
|
Unit examples (WINDEV): The special characters
[ + ] Handling special characters in an RTF control and viewing the ASCII and ANSI codes.
|
|
Unit examples (WINDEV): The voice recognition functions
[ + ] Using the voice recognition functions. The voice commands of Windows Vista (or Windows XP, with a specific software) are used to control WINDEV applications with the voice. A WINDEV application already responds to the voice when the user dictates in an edit control or spells out the caption of a button. You also have the ability to program a specific voice command to perform a specific action.
|
|
Unit examples (WINDEV): Advanced input mask
[ + ] Handling the input masks in WINDEV: - Defining the format of positive/negative number in a numeric edit control - Defining how negative numbers will be displayed in a numeric edit control - Defining how the value 0 will be displayed in a numeric edit control - Using a regular expression to prevent from typing characters other than 1, 2, 3, 4, 5 and 6. - Using a regular expression to "regulate" the input of a French registration number
|
|
Training (WINDEV): WD Search Control
[ + ] This example explains how to manage an edit control used to perform FullText searches of "google" type in your database.
|
|
Complete examples (WEBDEV): WW_Rewali
[ + ] This example is a site for travel booking. It proposes travels at very attractive prices. You have the ability to choose the travel duration, the start dates, then validate the purchase until the payment via Paypal. It is using the "scrolling banner" control and the planes.
|
This page is also available for…
|
|
|
|
|
|
|