35 spinbox

A spinbox is a container object consisting of two arrow keys and which has exactly one child. This child must be a single-line edittext or statictext used to indicate the currently set value. If a value of the spinbox is being changed – by using an arrow key or by assigning a new value – the contents of the field will be updated automatically.

Definition

{ export | reexport } { model } spinbox  { <Identifier> }
{
  <standard attributes>
  <plain attributes>
  <geometry attributes>
  <hierarchy attributes>
  <layout attributes>
  <text attributes>
  <object-specific attributes>
}

Events

changed

cut

extevent

help

key

paste

scroll

Children

document

1 edittext or 1 statictext

record

transformer

Parent

groupbox

layoutbox

module

notepage

splitbox

toolbar

window

Menu

Pop-up menu

Methods

:delete()

:exchange()

:find()

:insert()

35.1 Attributes

Attribute

RSD

PSD

Properties

Short Description

.acc_label

string

object

string

text

S.G/D/C

overwrites the Automation Identifier for Microsoft UI Automation

.acc_text

object

string

text

string

S.G/D/C

overwrites the Automation Name for Microsoft UI Automation

.activeitem

integer

integer

S,G/D/C

current value at style = string

.borderstyle

enum

enum

S,G/D/C

defines the style, i.e. representation and characteristics of the borders (since IDM version A.06.01.a)

.child[integer]

object

object

S,G/-/C

accesses the I-th child object

.childcount

integer

integer

-,G/-/-

queries the number of child objects

.class

class

class

-,G/-/-

object class

.control

identifier

instance

-,G/-/-

control the object currently belongs to

.curvalue

integer

integer

S,G/D/C

current value at style <> string

.cut_pending

boolean

boolean

S,G/-/-

cut operation has not been executed yet

.cut_pending_changed

boolean

boolean

-,G/-/-

changing state during a cut operation

.deltavalue

integer

integer

S,G/D/C

value that indicates the number of steps

.dialog

identifier

instance

-,G/-/-

object dialog

.direction

integer

integer

S,G/D/C

alignment of spinbuttons

.document[integer]

object

document

S,G/-/-

accesses the I-th XML Document

.external

boolean

boolean

-,G/-/-

returns if the object class is an USW class

.external[integer]

class

class

-,G/-/-

returns the I-th registered USW class

.focus

object

instance

S,G/-/-

key focus of object

.firstchild

object

object

S,G/-/C

accesses the first child object

.firstrecord

object

record

S,G/-/C

accesses the first record of an object

.font

identifier

font

S,G/D/C

object font

.height

integer

integer

S,G/D/C

object height

.itemcount

integer

integer

S,G/D/C

number of text elements

.index

integer

integer

-,G/-/-

current index of object in children list of its parent

.label

string

string

S,G/D/C

name (identifier) of object

.lastchild

object

object

S,G/-/C

accesses the last child object

.lastrecord

object

record

S,G/-/C

accesses the last record of an object

.mapped

boolean

boolean

S,G/D/-

defers the display of a visibly created object

.maxvalue

integer

integer

S,G/D/C

maximum value at style <> string

.member[integer]

attribute

attribute

-,G/-/-

i-th user-defined attribute of object

.membercount

integer

integer

-,G/-/-

number of user-defined attributes

.minvalue

integer

integer

S,G/D/C

minimum value of style <> string

.model

identifier

instance

S,G/D/C

model belonging to object

.notepage

identifier

instance

-,G/-/-

notepage the object currently belongs to

.parent

identifier

instance

S,G/-/-

parent of object

.real_height

integer

integer

-,G/-/-

real height of object

.real_visible

boolean

boolean

-,G/-/-

real visibility of object

.real_width

integer

integer

-,G/-/-

real width of object

.record[integer]

object

record

S,G/-/C

accesses the I-th record of an object

.recordcount

integer

integer

-,G/-/-

queries the number of child records

.scope

integer
(1, 2, 3)

scope

-,G/-/-

queries the object type (Default, Model or instance)

.sensitive

boolean

boolean

S,G/D/C

selectability of object (= always false)

.statushelp

string

identifier

string

text

S,G/D/C

text to appear in the statusbar

.style

datatype

datatype

S,G/D/C

defines the spinbox type

.text[integer]

string

identifier

string

text

S,G/D/C

individual text

tile

object

tile

S,G/D/C

tile resource used as background image

.tilestyle

enum

enum

S,G/D/C

controls how the background image set in .tile is arranged

.toolbar

object

object

-,G/-/-

toolbar of object

.toolhelp

text

text

S,G/-/-

specified text to be displayed in pop-up

.userdata

anyvalue

anyvalue

S,G/D/C

userdata of object of any datavalue

.visible

boolean

boolean

S,G/D/C

visibility of object

.width

integer

integer

-,G/-/-

width of object

.window

identifier

instance

-,G/-/-

queries window of object

.wrap

boolean

boolean

S,G/D/C

determines whether a wraparound is possible

.xraster

integer

integer

S,G/D/C

unit in x direction

.yraster

integer

integer

S,G/D/C

unit in y direction

35.2 Specific Attributes

.wrap

This attribute for the spinbox controls whether a circular spinning is to be carried out (.wrap = true), or if the spinning is to be stopped once the spinning limits are reached (.wrap = false).

This attribute has the value true per default.

.deltavalue

This attribute specifies the difference value by which .curvalue is to be increased or decreased each step.

.borderstyle

Attribute is supported, but only border_none and border_toolkit are permitted. border_plain, border_raised and border_sunken are mapped to border_toolkit.

35.3 Example

dialog Spinbox

{

}

color White "WHITE", grey(0);

window Wn

{

  .xleft 73;

  .width 260;

  .ytop 29;

  .height 222;

  .title "TestWindow";

  child spinbox Sp1

  {

    .xleft 62;

    .ytop 64;

    .curvalue 1;

    child edittext

    {

      .xauto 0;

      .xleft 0;

      .xright 0;

      .yauto 0;

      .ytop 0;

      .ybottom 0;

      .content "1";

    }

  }

  child spinbox Sp2

  {

    .xleft 62;

    .width 100;

    .ytop 113;

    .style string;

    .maxvalue 7;

    .text[1] "Monday";

    .text[2] "Tuesday";

    .text[3] "Wednesday";

    .text[4] "Thursday";

    .text[5] "Friday";

    .text[6] "Saturday";

    .text[7] "Sunday";

    .activeitem 1;

    child edittext Et2

    {

      .xauto 0;

      .xleft 0;

      .xright 0;

      .yauto 0;

      .ytop 0;

      .ybottom 0;

      .content "Monday";

    }

  }

}

Figure 13-39: Spinbox