Form Controls

All items added to a form are controls. Examples of controls include text boxes, list boxes, option buttons, command buttons, and images.

Controls display data, perform actions, or provide decoration. For example, you can use a text box on a form to display data, a command button on a form to open another form, or a picture on a form to show a company logo. For more information on the different types of controls available in Microsoft Dynamics AX, see Overview of Form Control Types.

The properties on a form control determine the data source and behavior of a control. Control settings can usually remain at Auto. Some controls, however, have properties that must be set. For more information, see Form Control Properties.

The behavior of a control must sometimes be programmed. Each form control has a set of methods that can be overridden. You can also create your own methods. For more information, see Methods on Form Controls. If you need to add code, write it on the form data source (table), or in a class rather than on a control. This enables the code to be reused.

The data source for a control can be a database field (a bound control), or the result of a calculation (a calculated control). Other controls do not have a data source or display a hard-coded text string or graphic. These are unbound controls. For more information, see Bound Controls, Unbound Controls, and Calculated Controls.

Controls are sometimes containers for other controls. For example, Grid controls can contain edit controls (StringEdit, IntEdit, and so on), and a Tab control can contain TabPage controls.

For examples of how controls are used in Microsoft Dynamics AX, see the tutorial_Form_Controls, tutorial_Form_ListControl, tutorial_Form_TableControl, tutorial_Form_TreeControl, and tutorial_Form_Windowingrid forms.

Community Additions