@...TEXTBOX DEFINE TEXTBOX Create a TextBox control
|
Creates a TextBox control.
SYNTAX
Standard Window:
@ <nRow> ,<nCol> TEXTBOX <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ HEIGHT <nHeight> ]
[ WIDTH <nWidth> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ NUMERIC [ INPUTMASK <cMask> FORMAT <cFormat>] ] | PASSWORD ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor
[ MAXLENGTH <nInputLength> ]
[ UPPERCASE | LOWERCASE ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
Dialog Window:
REDEFINE TEXTBOX <ControlName>
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ NUMERIC [ INPUTMASK <cMask> FORMAT <cFormat> ] ] | PASSWORD ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor>
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor>
[ MAXLENGTH <nInputLength> ]
[ UPPERCASE | LOWERCASE ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
NUMERIC INPUTMASK
@ <nRow> ,<nCol> TEXTBOX <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ HEIGHT <nHeight> ]
[ WIDTH <nWidth> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor>
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor>
NUMERIC INPUTMASK <cMask>
[ FORMAT <cFormat> ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
Dialog Window:
REDEFINE TEXTBOX <ControlName>
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor>
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor>
NUMERIC INPUTMASK <cMask>
[ FORMAT <cFormat> ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
CHARACTER INPUTMASK
@ <nRow> ,<nCol> TEXTBOX <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ HEIGHT <nHeight> ]
[ WIDTH <nWidth> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor>
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor>
[ INPUTMASK <cMask> ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
REDEFINE TEXTBOX <ControlName>
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor>
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor>
[ INPUTMASK <cMask> ]
[ UPPERCASE | LOWERCASE ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
DATE TYPE
@ <nRow> ,<nCol> TEXTBOX <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ HEIGHT <nHeight> ]
[ WIDTH <nWidth> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor>
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor>
DATE
[ UPPERCASE | LOWERCASE ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
REDEFINE TEXTBOX <ControlName>
ID <nId>
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ FIELD <FieldName> ]
[ VALUE <nValue> ]
[ READONLY ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ] // * or <anBackColor, anReadOnlyBackColor>
[ FONTCOLOR <anFontColor> ] // * or <anFontColor, anReadOnlyFontColor>
DATE
[ UPPERCASE | LOWERCASE ]
[ ON INIT <OnInitProcedure> | <bBlock> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <nHelpId> ]
[ CUEBANNER | PLACEHOLDER> <CueText>
Alternate Syntax:
DEFINE TEXTBOX <ControlName>
<PropertyName> <PropertyValue>...
<EventName> <EventProcedure> | <bBlock>...
END TEXTBOX
nRow, nCol
|
Position in the area of ??the window in pixels.
|
nWidth, nHeight
|
The desired size of the TextBox Control in pixels.
|
nId
|
The ID identifier this Control in Dialog Window
|
ControlName
|
A reference to the TextBox Control
|
ParentWindowName
|
A reference to the Parent Window.
|
nHelpID
|
The help topic identifier for this Control
|
FieldName
|
Specifies a Field Name assigned to the TextBox control
|
nValue
|
Specifies the startup value of the TextBox control
|
cFontName
|
Specifies the Font Name
|
cFontSize
|
Specifies the Font Size
|
cMask
|
Specifies the input mask to use for data entry
(see below in remarks) |
cFormat
|
Specifies the format string for numeric data entry only
(see below in remarks) |
cToolTipText
|
Specifies the Text for the ToolTip
|
aBackColor
|
Specifies the Background Color
|
aReadOnLyBackColor
|
Specifies the Background Color in ReadOnly Mode
|
aFontColor
|
Specifies the Font Color
|
aReadOnlyFontColor
|
Specifies the Font Color in ReadOnly Mode
|
nInputLength
|
Specifies the Input length for the control
|
OnGotFocusProcedure
|
An action to be performed when control Got Focused
|
OnChangeProcedure
|
An action to be performed when control value Changes
|
OnLostProcedure
|
An action to be performed when control Lost Focused
|
OnEnterProcedure
|
An action to be performed when control Enter is Pressed
|
|
|
READONLY
|
Specifies that the TextBox control is in ReadOnly mode
|
UPPERCASE
|
Specifies whether character will be automatically converted
to uppercase
|
LOWERCASE
|
Specifies whether character will be automatically converted
to lowercase
|
RIGHTALIGN
|
Specifies to right align the TextBox control
|
INVISIBLE
|
The visibility property specifies whether or not a control is
visible
|
NOTABSTOP
|
Stop the control to receive focus and participate in the
tabbing sequence
|
NOBORDER
|
Specifies that No Border be draw around the control
|
Remarks
InputMask String (Numeric Textbox):
9 Displays digits
$ Displays a dollar sign in place of a leading space
* Displays an asterisk in place of a leading space
. Specifies a decimal point position
, Specifies a comma position
InputMask String (Non-Numeric Textbox):
9 Digits
A Alphabetic Characters
! Alphabetic Characters (Uppercase Conversion) and Digits
(All other characters are included in text in the position indicated by the mask)
Format String (Allowed in Numeric Textbox Only):
C: Displays CR after positive numbers
X: Displays DB after negative numbers
( : Encloses negative numbers in parentheses
E: Displays numbers in British format
N: Displays Alphabetic Characters and Digits
Note: Since version HMG 1.1 Experimental 12a FontColor and BackColor property can be defined as RGB array or array od RGBArrays for Enable and ReadOnly stage ReadOnly stage preserve defined FontColor and BackColor
PROPERTIES:
Set / Gets TextBox value.
| |
Set / Gets enabled state of a TextBox control
| |
Set / Gets visible a TextBox control.
| |
Set / Gets row position of a TextBox control.
| |
Set / Gets column position of a TextBox control.
| |
Set / Gets width of a TextBox control.
| |
Set / Gets height of a TextBox control.
| |
Set / Gets TextBox control's font name.
| |
Set / Gets TextBox control's font size.
| |
Set / Gets TextBox control's font bold property
| |
Set / Gets TextBox control's font italic property
| |
Set / Gets TextBox control's font underline property
| |
Set / Gets TextBox control's font strikeout property
| |
Set / Gets the foreground color for text within the TextBox
| |
Set / Gets the background color for text within the TextBox
| |
Set / Gets TextBox control's tooltip text.
| |
Set / Gets the caret position of a textbox control.
| |
Set / Gets user property 'CaseConvert' for TextBox control
| |
Set / Gets user property 'Cargo' for TextBox control
| |
Retrieves the name of a TextBox control.
| |
· Parent (D)
|
Set the name as character identifier of the control.
|
Set the name as character identifier of the parent window.
| |
Set the numeric help topic identifier of the control.
| |
Links controls TextBox to a table field.
| |
Specifies the TextBox control is of NUMERIC type
| |
· Date (D)
|
Specifies the TextBox control is of DATE type
|
· InputMask (D)
|
Specifies the edit mask for a TextBox control
|
· Format (D)
|
|
Specifies the maximun input length for a TextBox control
| |
| |
| |
Specifies whether the content of a TextBox control will be right aligned
| |
Sets whether an element behavior can't receive focus and participate in
the tabbing sequence
|
D: Available at control definition only
R: Read-Only
EVENTS:
Action to be performed when getting the focus
| |
Action to be performed when generic changing of the control
| |
Action to be performed when losing the focus.
| |
Action to be performed when pressing a Enter key
|
METHODS:
Shows a TextBox control
| |
Hides a TextBox control
| |
Redraw a Control
| |
Gives the focus to a TextBox control
| |
Releases a TextBox control from memory
| |
Reread data from database`s field defined in FIELD clause.
(!)This method can be used only if FIELD clause is set.
| |
Save data
for Control TextBox
| |
Save a TextBox control as BitMap file.
|
EXAMPLE: