@...TEXTBOX
DEFINE TEXTBOX
  

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE | LOWERCASE ]
ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE | LOWERCASE ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
NUMERIC INPUTMASK <
cMask>
[ FORMAT <
cFormat>]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
NUMERIC INPUTMASK <
cMask>
[ FORMAT <
cFormat>]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
INPUTMASK <
cMask> ]
[ UPPERCASE | LOWERCASE ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
INPUTMASK <
cMask> ]
[ UPPERCASE | LOWERCASE ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
DATE
[ UPPERCASE | LOWERCASE ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

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 <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
DATE
[ UPPERCASE | LOWERCASE ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOBORDER ]
[ HELPID <
nHelpId> ]

Alternate Syntax:

DEFINE TEXTBOX <Controlname>

<PropertyName> <PropertyValue>...
<EventName> <EventProcedure> | <bBlock>...

END TEXTBOX

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 ar 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:

·   Value
Set / Gets TextBox  value.
·   Enabled
Set / Gets enabled state of a TextBox  control
·    Visible
Set / Gets visible a TextBox  control.
·    Row
Set / Gets row position of a TextBox  control.
·    Col
Set / Gets column position of a TextBox  control.
·    Width
Set / Gets width of a TextBox  control.
·   Height
Set / Gets height of a TextBox  control.
·   FontName
Set / Gets TextBox  control's font name.
·   FontSize
Set / Gets TextBox  control's font size.
·   FontBold
Set / Gets TextBox  control's font bold property
·   FontItalic
Set / Gets TextBox  control's font italic property
Set / Gets TextBox  control's font underline property
Set / Gets TextBox  control's font strikeout property
·   FontColor
Set / Gets the foreground color for text within the TextBox
·   BackColor
Set / Gets the background color for text within the TextBox
·   ToolTip
Set / Gets TextBox  control's tooltip text.
·   CaretPos
Set / Gets the caret position of a textbox control.
·   Cargo
Set / Gets user property 'Cargo' for TextBox control
·   Name (R)
Retrieves the name of a TextBox control.
·   Parent (D)
Set the name as character identifier of the control.
·   Parent (D)
Set the name as character identifier of the parent window.
·   HelpId (D)
Set the numeric help topic identifier of the control.
·   Field (D)
 
·   Numeric (D)
 
·   Date (D)
 
·   InputMask (D)
 
·   Format (D)
 
·   MaxLength (D)
 
·   UpperCase (D)
 
·   LowerCase (D)
 
·   RightAlign (D)
 
·   NoTabStop (D)
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:

·   OnGotFocus
An action to be performed when getting the focus
·   OnChange
An action to be performed when generic changing of the control
An action to be performed when losing the focus.
·   OnEnter
Action to be performed when pressing a Enter key

METHODS:

·   Show
Shows a TextBox control
·   Hide
Hides a TextBox control
·   SetFocus
Gives the focus to a TextBox control
·   Release
Releases a TextBox control from memory
·   Refresh
Reread data from database`s field defined in FIELD clause.
(!)This method can be used only if FIELD clause is set.
·   Save
Save data for Control TextBox
·   SaveAs
Save a TextBox control as BitMap file.

EXAMPLE:

see demo in :
\Samples\Basic\TextBtn