Windows control - Spin button

Windows control - Spin box is used to generate a picture event after clicking the spin button. Spin button composes of two active parts, where clicking one part increase the value of the spin button and clicking the other decrease the value. Spin buttons can be also controlled by the keyboard using the up and down arrow keys. If any of Windows controls (usually an Text entry field) is placed before a spin button (important is Order not position in picture), the spin button value controls the value of Window control.


Example

Example - Spin button

To create spin button

  1. In the Drawing toolbar click the button Spin button Spin button.
  2. Point the mouse cursor to the position of the first displayer corner and click.
  3. Point the mouse cursor to the position of the diametric displayer corner and click.

Spin button parameters are being configured in the palette Connect object through the following tabs:

Connect


Connected object

Selection of an object to connect. The object allows to set the value of the spin button and vice versa - the value of the object is being changed when the user clicks any of the active parts of the spin button (or presses arrow keys). The value is changes always with the step of 1. The object must be of integer type.


When you connect an object of Structured variable you must define whose item will be connected to the spin button. Unique item position in structured variable is defined by the column name (the parameter Column) and the row number (the parameter Row). For object of Value array you must define which array item will be connected to the spin button.

Script


Reference variable

Specifies the name of the spin button in the form of reference variable for use in the picture script.

Metadata

Assignment of application data (metadata) to a graphic object. If the object contains some metadata, the name of the first record will be displayed in the button. Multiple records are indicated by ",...".

Event

The list box allows user to select active picture event for the spin button. The list box contains the following active picture events:

Event Handler

The button opens the active picture script to define the active picture event specified by the parameter Event.

Info text/URL


Info text

Text to display as a tooltip when user points the mouse cursor to the spin button in the picture opened in process D2000 HI.

URL

Definition of URL address to open a web page from a picture. The address may be set also in the picture script by the function %HI_SetOBJURL.

Possibility to use the Dictionary (to open press CTRL+L).

Properties


Connect object palette - Properties tab

Text

The parameter is useless for this type of Windows control.

Visible

If the parameter is checked, the spin button will be visible after first opening the picture in process D2000 HI. The parameter can be controlled from the script using the function %HI_SetVisible.

Disabled

If the parameter is checked, the spin button will be disabled after first opening the picture in process D2000 HI. The parameter can be controlled from the picture script using the function %HI_SetEnable.

Group

The parameter allows you to set the spin button as the first control of a group of Windows controls.

Low limit, High limit

The parameters allow to define the range of the spin button. If you define the value equal to the value defined in High limit, next increasing the spin button value will be equal to the value defined by Low limit  and vice versa - values are in a loop. Permitted range is from -32768 up to +32767.

Font

This parameter is useless for this type of Windows control.

Napíšte komentár