Configure a spin box

Add a spin box object and edit its properties.
  1. In
    Project view
    , in
    UI
    , right-click a container to contain the spin box, and then select
    New
    Base controls
    Spin box
    .
  2. (optional) In
    Properties
    , adjust the spin box settings:
    • Value
      . Starting value. Either a numerical value or a dynamic link to a variable with a numerical value.
      TIP: If you dynamically link the
      Value
      property with a variable and enter a new value at runtime, the new value will be automatically converted to the linked variable data type. For example, if you link to a variable of a UInt32 data type and enter
      1.6
      into the spin box, the entered value will be rounded up to
      2.0
      .
      For more information about dynamic links, see Create dynamic links.
    • Minimum value
      . Minimum value that you can set for the spin box.
      TIP: If the value is outside the
      Minimum value
      and
      Maximum value
      range, the spin box border turns red for a brief moment and the value reverts to the previous value.
    • Maximum value
      . Maximum value that you can set for the spin box.
    • Increment
      . Value by which to increase or decrease the value when you use the buttons to increment the value.
    • Input format
      . Format of displayed value.
      Allowed values are as follows:
      Numeric (Double Float Int16 Int32 Int64 Integer UInt16 UInt32 UInt64 UInteger)
      Format
      Description
      Example
      d
      Numerical, without thousands separator.
      After the format placeholder, the number of decimal places is configured with an integer (without padding).
      • d
        : -1234 ► -1234
      • d
        : 5.618 ► 5618
      • d2
        : 1,234.239 ► 1234.24
      n
      Numerical, with thousands separator.
      After the format placeholder, the number of decimal places is configured with an integer (without padding).
      • n1
        : -1234.23 ► -1,234.2
      • n2
        : 5804.236 ► 5,804.24
      • n3
        : -1234.23 ► -1,234.230
      e
      Exponential notation.
      After the format placeholder, the number of decimal digits is configured with an integer.
      • e10
        : 12345.6789 ► 1.2345678900E4
      • e2
        : 2665.778 ► 2.67E3
      f
      Fixed-point notation.
      After the format placeholder, the exact number of decimal places is configured with an integer.
      • f3
        : 123 ► 123.000
      • f3
        : 123.23 ► 123.230
      • f4
        : -1898300.678 ► -1,898,300.6780
      • f3
        : 123.4 ► 123.400
      p
      Percentage.
      After the format placeholder, an integer is used to configure the number of decimal places.
      • p
        : 1 ► 100%
      • p3
        : -0.397481 ► -39.748%
      x
      Hexadecimal notation.
      255 ► ff
      b
      Binary notation.
      107 ► 1101011
      o
      Octal notation.
      56 ► 70
    • Editable
      . Enable entering the spin box value with keyboard keys.
      TIP: Even if
      Editable
      is set to
      False
      , you can still use spin box buttons to increase or decrease the spin box value.
    • Show buttons
      . Display buttons to increase or decrease the value.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.