Supported widgets

Abstract

This document is a summary of all widgets supported by the Display Machine.

Dynamic widgets

Overview

Dynamic widgets are always bound to some target. Widget displays the current value of the target. Value of the target is updated as the user manipulates the widget at runtime.

Push button

Overview

Push button is associated with some action, which is performed when the button is pressed.

Targets

Procedure

The procedure is invoked when the button is pressed.

Displayable object

A form is displayed when the button is clicked. This is equivalent to binding the button to the procedure display(form_number) of the displayable object and supplying an appropriate form_number as the procedure parameter.

Check box

Overview

Check box is usually used to choose from a set of related but independent options. Check box has only two states: checked and unchecked. The user may toggle its state by clicking on it. On the screenshot below you can see two check boxes: one of them is checked, the other one is unchecked.

Targets

Boolean value

Check box is checked when the value is "true" and cleared when the value is "false".

Integer value

Check box is checked when the value is non-zero and cleared when the value is zero.

Radio button

Overview

Radio button has two states: checked and unchecked. Radio buttons are usually grouped together to represent a set of related but mutually exclusive options. When a radio button in the group is checked, the others are automatically unchecked, i.e. only one radio button in the group is selected at the time.

Targets

Integer value

Radio button has an important property - default integer value. When the target value equals to the default value, the button is checked. Conversely, when the user checks the radio button, the default value is assigned to the target. To form a group, a set of radio buttons with different default values is bound to the same target.

Text editor

Overview

Single line editor

User can edit a single line of text. Length of the line may be limited and some action may be performed when the limit is exceeded.

Multiple line editor

When the editor operates in multiple line mode, several lines of text are visible in the edit field. The user may break lines by inserting carriage returns. These carriage returns are stored in the target string as CR LF two-character sequence (on Windows systems).

Password field

User may enter an arbitrary string value in the field, but all characters on the screen are replaced with asterisks ("*").

Targets

String value

The value is displayed in the editor and when the user edits the text, it is assigned back to the target. No intermediate conversions are performed. Text editor attached to the string can operate in single or multiple line mode.

Integer value

For displaying in the edit field integer value is converted to the string according to the specified format. When the user changes the contents of the edit field, an attempt to convert the string back into the integer value is taken. If this attempt fails, the default zero (0) value is assigned to the target.

Real value

The real value is handled similarly to the integer value, but an extended formatting may be applied to it. When the conversion from string to real value fails, a zero value (0.0) is assigned to the target.

Track bar

Overview

Track bar is a widget that can modify an integer value in the specific range. The user drags the thumb to set the new value. Additionally, a track bar may have a selection range.

Targets

Integer value

A value of the target is displayed proportionally to its position inside bounds. A new value is calculated and assigned to the target as the user moves the thumb.

Up-down

Overview

Up-down is a simple widget that can modify an integer value in the specific range by incrementing or decrementing it. Up-down does not display the value and it is usually used together with some other widget, e.g. edit widget.

Targets

Integer value

Integer value of the target is stored internally in the up-down widget. When the user presses up or down buttons, the value is automatically incremented or decremented and stored in the target.

Progress bar

Overview

Progress bar is a widget that can show the position of an integer value in the specific range. Progress bar does not accept user input.

Targets

Integer value

A value of the target is displayed proportionally to its position inside bounds.

List box

Overview

A widget that contains a list of items that can be selected by the user.

Targets

Array of string values

List box is populated with the target contents, i.e. for every item in the target array there will be one item in the list box. Order of items is preserved.

Array of integer values

Integer values are converted into string representation before they are inserted into the list box.

Combo box

Overview

A widget, containing a drop-down list and a selection field that, depending on properties, can or cannot be edited by the user. A drop-down combo box can be used in place of a list box when screen space is tight.

Targets

Array of string values

Combo box is populated with the target contents, i.e. for every item in the target array there will be one item in the combo box. Order of items is preserved.

Array of integer values

Integer values are converted into string representation before they are inserted into the combo box.

Listview

Overview

Targets

Array of arbitrary data

Listview is populated with the target contents, i.e. for every item in the target array there will be one item in the listview.  Order of array items is preserved. Lines in the listview are broken into several columns. Every column contains data taken from the array item.

DateTime

Overview

Targets

A set of integer values

The widget has a set of integer properties (hour, minute, year, month, etc.) which may be bound to integer targets.

Treeview

Overview

Targets

Tree item

A specially designed type to be used in treeviews. Allows to organize forest-like structures at runtime.

Static widgets

Overview

Static widgets have no target and send no control or data to the application.

Label

A static widget containing plain text. Used to provide descriptions for the other widgets.

Group box

Overview

A rectangle used to group related controls (usually check boxes or radio buttons). Because its sole purpose is to organize other controls, a group box does not accept user input.

Panel

A sunken pane used to separate groups of widgets. May be alternatively used to group widgets like a group box.

Container widgets

Overview

Container widgets can contain other widgets and forms.

Tabs

Under construction

Splitter

Under construction

See also

 


Copyright © Object Tools -- info@object-tools.com
Last updated: 2005/02/02 11:51:10