Controls

Previous Next

Controls are "visible" objects on windows/dialogs. You can insert controls into any parent object. Inserted controls behave as children. The controls that you can add are shown in the following table.

Control

Description

Bar Chart

A bar chart is a graphic representation for comparing numbers. It displays rectangles that have a uniform width, but a length that is proportional to the numbers being represented.

The data displayed is retrieved by means of the SQL statement in the SQL property. The first column in the SELECT statement represents the primary axis, all other columns the secondary axis.

The Floor On Minimum property determines how negative values must be displayed (above or below the secondary axis). See the What's This help for the Floor On Minimum property for an illustration.

The Unit Lines Primary Axis, and Unit Lines Secondary Axis properties determine whether there must be just one primary and secondary axis, or whether each unit must have its own line. See the What's This help on these properties for an illustration.

The Bar Orientation property specifies whether the bars must be displayed bottom-up or left-to-right.

Button

A button performs one or more actions (specified as its Action property) when it is clicked.

To have a bitmap instead of a label on a button, set the Foreground Bitmap property.

To have the button auto-size itself around the bitmap, change the Auto-resize property to Yes, and set the Height, and Width properties to 0 (zero).

Check Box

A check box has three "states" (checked, cleared, and disabled). The "disabled" (or grayed-out, indeterminate state) is only available if the Mandatory property has been set to No.

Combo Box

A combo box combines a list of options (see Dropdown List) with a field in which the end users can type a value.

These options can either be hard-coded in the Value List property, or retrieved from the database by means of the SQL Statement (Values to Query) property.

If you use the Value List property, you can provide alternative prompts by means of the Value List Prompts property. The items in both properties must be separated by returns (press SHIFT+ENTER, or CTRL+ENTER)

Dropdown List

A dropdown list offers a list of options from which the end user must choose one. These options can either be hard-coded in the Value List property, or retrieved from the database by means of the SQL Statement (Values to Query) property.

If you use the Value List property, you can provide alternative prompts by means of the Value List Prompts property. The items in both properties must be separated by returns (press SHIFT+ENTER, or CTRL+ENTER)

Label

A label displays a bit of text, set as its Label property. You can also use it to display a bitmap by setting its Foreground Bitmap property.

Line Chart

A line chart (or "graph") represents data by means of dots and/or lines.

The data displayed is retrieved by means of the SQL Query property. The first column in the SELECT statement represents the primary axis, all other columns the secondary axis. If the primary axis represents a numeric value, then the axis is scaled numerically from the minimum to the maximum value. If not, it is scaled linearly with each unit representing a record.

The Floor On Minimum property determines how negative values must be displayed (above or below the secondary axis). See the What's This help on the Floor on Minimum property for an illustration.

The Unit Lines Primary Axis, and Unit Lines Secondary Axis properties determine whether there must be just one primary and secondary axis, or whether each unit must have its own line. See the What's This help for these properties for an illustration.

The Line Style property specifies whether the graph is built from dots, lines, or both.

List View

The List View control will typically be used to represent data in a list. The actual objects to be displayed in the list are retrieved from the database.

Multi-line Text Box

Presents a large text field, in which multiple lines of text can be entered. To provide this control with a text editor, you could specify PopupEditorDialog(CurrentColumn()).Window.Create()

as the Edit Method property. (An Edit (...) button will then be inserted automatically.)

Option Buttons

(Also known as Radio Buttons.) Present a number of options from which the end user can choose only one.

Pie Chart

A pie chart shows values as a percentage of the sum of all records retrieved.

The data displayed is retrieved by means of the SQL property. The first column in the SELECT statement retrieves the labels, the second column represents the data; all other columns are discarded.

The Data Label Type property determines if and how labels should be displayed.

NOTE: The pie chart's shape depends on the size of its field: if the field is a square (height equals width), the pie is a circle. If it is a rectangle (height unequal to width) it is an oval/ellipse.

RTF Text Box

Presents an OLE Container in which RTF text can be displayed. To actually edit the text, the end user has to use the context menu.

To specify a different editor to WordPad, such as WRITE.EXE on Windows, choose an option for the Object Name property.

Spin Box

Spin boxes are useful for entering whole numbers (i.e. integers). The values that a spin box can accept must be between -32767 and +32767, and cannot be more than 32767 digits apart. (For example, from 0 to 32767 or from 32767 to 0, but not from -32767 to +32767.) These values are entered in the Range Minimum, and Range Maximum properties.

Tab (Pages)

USoft Developer's implementation of tab pages consists of a Tab object with one or more Tab Page objects. A property that you might want to set at the Tab-object level is the Tab Order property.

The titles or prompts of the individual tab pages are set by means of their Page Title property. The sequence in which tab pages are ordered front to back can be changed by means of their Position property.

Text Box

Presents a plain field, with a prompt and a data area.

Text Document

Presents a field in which a filename can be entered. The ellipses (...) button starts Notepad on the file. If you wish to use a different editor, change the Edit Method property. For example, if you want to use WordPad or WRITE.EXE:

CommandWindows('WRITE.EXE ' ||:ThisVariable)

Note that Windows automatically translates "WRITE" into "WordPad" (this way you do not have to specify the full path).

Text Editor

Presents a text field with an ellipses (...) button to start USoft Developer's internal Text Editor. If you wish to perform some other action, change the Action property of the Ellipsis button.

Tree View, and Tree View Node

The Tree View control will typically be used to represent data in hierarchies. Tree Views are only of the most compact and visually appealing ways of presenting data structures and allowing navigation through them. The USoft Developer implementation of the Tree View control consists of two object types, the Tree View and its Tree View Node objects. Tree View Nodes typically represent user application data. A SQL Query that you write for each Tree View Node determines what they show.