PtNumericFloat

PtNumericFloat — An entry box for floating-point values.

Synopsis

class PtNumericFloat PtNumeric
{
    numeric_increment;    // double array  (Pt_ARG_NUMERIC_INCREMENT)    
    numeric_max;          // double array  (Pt_ARG_NUMERIC_MAX)    
    numeric_min;          // double array  (Pt_ARG_NUMERIC_MIN)    
    numeric_precision;    // integer  (Pt_ARG_NUMERIC_MAX)    
    numeric_value;        // double array  (Pt_ARG_NUMERIC_VALUE)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtNumeric <-- PtNumericFloat

Description

This widget is a text-entry box for floating-point numbers that can be incremented or decremented with small arrow-shaped buttons. You can set a minimum, a maximum, a precision level, and the size of the increment/decrement for the arrow buttons. Inherited variables let you use comma separators or add a prefix/suffix strings.

[Note]

For detailed information, please refer to PtNumericFloat in the Photon documentation.

Instance Variables

numeric_increment

A number specifying the amount to increase or decrease the displayed value when the arrow buttons are pressed. Default is 1.0.

numeric_max

A number specifying the maximum allowable value to be entered. Default is 1,000,000.00.

numeric_min

A number specifying the minimum allowable value to be entered. Default is -1,000,000.00.

numeric_precision

An integer specifying the number of decimal places to display. Default is 2.

numeric_value

The currently displayed value. Default is 0.00.

Callbacks

The following callback is associated with this widget:

CallbackDescription
Pt_CB_NUMERIC_CHANGEDThis callback is generated when the entered value changes.

Associated Classes

PtNumericFloatCallback, PtCallbackInfo

Example

See the example for PtNumericInteger.