Forms Designer - Working with Edit controls


To add an Edit control to a form click on the Edit control tool icon on the controls palette.

The Edit control is possibly the most widely used control of all as it allows the user to enter all types of data into the form. The control can be programmed to restrict the amount of information and the type of information that is entered, this is done with the Type$ property. In most cases the control is displayed as an edit control although special properties are available to allow for combo box and check box styles, see the DropDown and DropStyle properties for more information.

If a database object has been defined then you can drag columns from the database directly onto the form. Edit controls created by this method are automatically sized and will inherit the description and type information directly from the data dictionary associated to the table.

Generally an edit control will have some static text associated with it as a prompt. The best way to do this is not with a separate control but with the Label$ string property introduced in KCML 5.03. KCML will then take on responsibility for alignment in some circumstances (see Introduction to Edit Groups). When adding controls to a form they ought to be dropped on an Edit Group to facilitate automatic alignment.

Other useful Edit control properties

CanConvert
Help$
DropDown
DropStyle
DropDownFilled
Type$
ValidateText$
Label$

Useful Edit control event handlers:

Click()
DropDown()
MaxText()
Validate()