Common Options

This section describes the attributes that most of the tags have in common.

Attributes

    backgroundcolor
    fontbold
    fontitalic
    fontname
    fontsize
    fontunderline
    foregroundcolor
    id (required)
    oncreate (false)
    ondestroy (false)
    popup
    position (center)
    state (enabled)

Description of attributes

backgroundcolor

The backgroundcolor option contains the color that is used as the backgroundcolor of the element. Currently supported colors are: black, white, green, red, yellow, blue, gray, magenta, cyan and brown. The backgroundcolor is used to set the Color property of each control.

fontbold

This attribute indicates whether the font of the element must be bold. Allowed values are true and false. If fontbold is true than the set Font.Style will contain the value fsBold. Note that only controls that have the Font property will use this attribute. For other controls this value will not be used.

fontitalic

This attribute indicates whether the font of the element must be italic. Allowed values are true and false. If fontitalic is true than the set Font.Style will contain the value fsItalic. Note that only controls that have the Font property will use this attribute. For other controls this value will not be used.

fontname

The fontname specifies the name of the font that has to be used for the text in the element. Due to the differences in fonts on the platforms we only distinct between serif, sansserif and monospace. Serif fonts will be mapped on "Times new Roman", sansserif on "MS Sans Serif" and monospace on "Courier".

fontsize

The fontsize indicates the size of the font in points that is used for the text of the element. This value is used to set the Font.Size property. Note that changing the Font.Size property will not change the Height and Width properties. For instance, the Height of a TMemo will only be correct if used with the normal Font.Size (=8).

fontunderline

The fontunderline indicates whether the text of the element should be underlined. Allowed values are the booleans true and false. If fontunderline is true than the set Font.Style will contain the value fsUnderline. Note that only controls that have the Font property will use this attribute. For other controls this value will not be used.

foregroundcolor

The foregroundcolor option contains the color that is used as the foregroundcolor of the element. Currently supported colors are: black, white, green, red, yellow, blue, gray, magenta, cyan and brown. For controls with the Font property this value will be used to set Font.Color. Note that foregroundcolor is not used in case the control does not have a Font property.

id

The id attribute specifies the unique id of the object. The id attribute is required. The value of the id attribute should consist of lowercase characters. The attribute id of the window and application tag should match the file names without the ".xml" extension. For other controls the id attribute is used to set the Name property.

oncreate

If this attribute has the value true then an oncreate event will be created in the interface code and a section for the event code will be created in the codeframework of the window this element is in. Allowed values for this attribute are true and false.

For windows with oncreate="true" an OnCreate event will be generated for it. For other controls procedures (local to the constructor of the window that owns the control) will be generated. In both cases only the heading is generated. The whole body (begin, end; and variable declarations included) has to be specified in the codeframe.

ondestroy

If this attribute has the value true then an ondestroy event will be created in the interface code and a section for the event code will be created in the codeframework of the window this element is in. Allowed values for this attribute are true and false.

For windows with oncreate="true" an OnCreate event will be generated for it. For other controls procedures (local to the constructor of the window that owns the control) will be generated. In both cases only the heading is generated. The whole body (begin, end; and variable declarations included) has to be specified in the codeframe.

popup

The popup attribute refers to an existing popup menu that is used as popup menu for the element. The value of this attribute is the value of the id attribute of the popupmenu. This value is used to set the PopupMenu.

position

The position attribute is used to specify the position of the element when the layout style of the parent is the borderlayout. It can have the following values: left, right, top, bottom and center. The default value is center. The position attribute is ignored when the elements parent doesn't have the border layout. For more information on the layout click here

state

The state attribute indicates whether the element is enabled or disabled in the gui. The default value is enabled. This value is used to the corresponding Enable property