This class contains a label that precedes a text field that allows the user to enter in text.
Constructor.
Argument | Type | Default | Description |
p | FXComposite | Parent widget. | |
ncols | Int | Number of columns. | |
labelText | String | Label string. | |
tgt | FXObject | None | Message target. |
sel | Int | 0 | Message ID. |
opts | Int | AFXTEXTFIELD_STRING | Options and hints. |
x | Int | 0 | X coordinate of origin. |
y | Int | 0 | Y coordinate of origin. |
w | Int | 0 | Width of the widget. |
h | Int | 0 | Height of the widget. |
pl | Int | DEFAULT_PAD | Left padding (margin). |
pr | Int | DEFAULT_PAD | Right padding (margin). |
pt | Int | DEFAULT_PAD | Top padding (margin). |
pb | Int | DEFAULT_PAD | Bottom padding (margin). |
Returns the default width of the text field.
Reimplemented from FXPacker.
Returns the exponent type of the text field for real and complex types.
Sets the state of the check button or the radio button.
Argument | Type | Default | Description |
state | Int | Check state. |
Sets the message ID of the check button or the radio button.
Argument | Type | Default | Description |
sel | Int | Selector. |
Sets the message target of the check button or the radio button.
Argument | Type | Default | Description |
checkVal | Int | FALSE | Check state. |
Sets the cursor position.
Argument | Type | Default | Description |
pos | Int | Position. |
Sets the editable state for the text field.
Argument | Type | Default | Description |
edit | Int | TRUE | If TRUE, text can be edited. |
Sets the exponent type of the text field for real and complex types.
Argument | Type | Default | Description |
e | FXExponent | Exponent type. |
Sets the focus to the input field and selects its contents.
Moves the focus to the check button or the radio button (if existed) of the widget.
Moves the focus to the input field for the imaginary part.
Sets the focus to the input field for the imaginary part and selects its contents.
Sets the imaginary text for the complex text field.
Argument | Type | Default | Description |
text | String | Imaginary text field text. |
Sets the label text.
Argument | Type | Default | Description |
txt | String | Label text. |
Sets the number of columns. Note: The column width is based on the width of "m" of the font used.
Argument | Type | Default | Description |
cols | Int | Number of columns. |
Sets the precision of the text field for real and complex types.
Argument | Type | Default | Description |
p | Int | Precision. |
Sets the read-only state of the text field.
Argument | Type | Default | Description |
readonly | Int | TRUE | Read-only state. |
Select the specified number of characters starting at given position.
Argument | Type | Default | Description |
pos | Int | Position. | |
len | Int | Length. |
Sets the text in the input field.
Argument | Type | Default | Description |
text | String | Text field text. |
Sets the value type (AFXTEXTFIELD_FLOAT, etc.) of the text field.
Argument | Type | Default | Description |
type | Int | Value type. |
Sets the layout orientation of the text field.
Argument | Type | Default | Description |
vertical | Int | Vertical flag. |
Message ID's.
ID_SETIMAGINARYVALUE | ID for setting imaginary values. |
ID_GETIMAGINARYVALUE | ID for getting imaginary values. |
ID_BUTTON | ID for the check/radio button. |
ID_TEXT | ID for the text field. |
ID_IMG_TEXT | ID for the text field with imaginary part. |
Flags for AFX textfield options.
AFXTEXTFIELD_STRING | Value field is a string. |
AFXTEXTFIELD_INTEGER | Value field is an integer. |
AFXTEXTFIELD_FLOAT | Value field is a double. |
AFXTEXTFIELD_COMPLEX | Value fields consist of the real and imaginay components of a complex number. |
AFXTEXTFIELD_CHECKBUTTON | Use a check button instead of a label. |
AFXTEXTFIELD_RADIOBUTTON | Use a radio button instead of a label. |
AFXTEXTFIELD_VERTICAL | Orient label or button above text field. |
AFXTEXTFIELD_READONLY | Configure text field to the read-only state. |