@...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


DESCRIPTION:
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 ar
e 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.
Set / Gets user property 'CaseConvert' for 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)
Links controls TextBox to a table field.
·   Numeric(D)
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)
 
·   MaxLength(D)
Specifies the maximun input length for a TextBox control
·   UpperCase(D)
 
·   LowerCase(D)
 
·   RightAlign(D)
Specifies whether the content of a TextBox control will be right aligned
·   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
Action to be performed when getting the focus
·   OnChange
Action to be performed when generic changing of the control
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
·   Redraw
Redraw a 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
      \Samples\Basic\Browse_9

and sample in Chapter:
Getting data from the user (The TextBox Control)