Button Object Properties

Add a Button to a form to enable the user to provide a value that is sent back to the application when the button is clicked at runtime. Button objects have special characteristics when added to a GridPanel or a form.

Note: The read-only Design properties are displayed for Button objects associated with attributes. These properties provide a better understanding of the object. You can change the property values in the Properties window after selecting the associated attribute in the Class View.

Property

Function

Direction

Read-only. Specifies the value of the Direction property of the attribute associated with the Button object.

Id

Read-only. By default, automatically generated. Id="Button1" for the first inserted Button, Id="Button2" for the second, and so on.

Length

Read-only. Specifies the Length of the attribute associated with the Button object.

Name

Read-only. Specifies the name of the attribute associated with the Button object.

Primitive

Read-only. Specifies the value of the Primitive property of the attribute associated with the Button object.

BackgroundColor

Specifies a background color for the object. Select a color from one of the tabs in the drop-down list. Note that you can specify a custom color. If you change this value, you can restore the default value specified for the parent object by right-clicking the property and clicking Reset on the context menu.

BackgroundImage

Specifies an image to appear in the background of the object. The image always appears as a tiled image.

ControlType

Specifies Button as the type of object added to the form. To change the ControlType, choose from the list of available types.

Font

Specifies font attributes that are applied directly to the text appearing in the object. If you change this value, you can restore the default value specified for the parent object by right-clicking the property and clicking Reset on the context menu.

ForegroundColor

Specifies a foreground color for the object. Select a color from one of the tabs in the drop-down list. Note that you can specify a custom color. If you change this value, you can restore to the default value specified for the parent object by right-clicking the property and clicking Reset on the context menu.

Location

Specifies the point in pixels that represents the upper-left corner of the object relative to the upper-left corner of its container as an X and Y location.

Selected

Specifies whether the button should be selected by default. You can select only one button on a form. Therefore, when set to True, any other button in the same group is reset to False.

Size

Specifies the size of the object representing the height and width in pixels.

TabIndex

Specifies the index that defines the tab order for the object.

Button groups are defined as a set of button controls within a GridPanel. Set the TabIndex property on the GridPanel to define the position of the button group as a whole within the overall form tab order.

The TabIndex values for the individual buttons within the GridPanel can be set to any arbitrary values to define the order of tabbing from button to button within the button group.

Text

Specifies the text to be displayed on the object.

TextAlign

Specifies whether the text in the object is left-aligned, right-aligned, center-aligned, or justified.

ToolTip

Specifies an optional tooltip to appear when the user at runtime hovers the mouse over a control in Winforms. To view the tooltip in the Presentation Client, the user has to hover over the control and press the F1 key. This tooltip is visible only at runtime.

Value

Specifies a value to be returned to the server when the form is submitted at run time. This is to provide keyword/value pairs for button groups. Refer to GridPanel Function for more information on this property.