@... EDITBOX
DEFINE EDITBOX 
Creates an editbox control.
  

An EditBox control is a rectangular control window typically used in a dialog box to permit the user to enter and edit text by typing on the keyboard.

SYNTAX

Standard Window:

@ <nRow> ,<nCol> EDITBOX <ControlName>
[ ID <
nId> ]
[ OF | PARENT | DIALOG <
ParentWindowName> ]
[ WIDTH <
nWidth> ]
[ HEIGHT <
nHeight>]
[ FIELD <
FieldName> ]
[ VALUE <
cValue> ]
[ READONLY ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOVSCROLL ]
[ NOHSCROLL ]

Dialog Window:

REDEFINE EDITBOX <ControlName>
ID <
nId>
[ OF | PARENT | DIALOG <
ParentWindowName> ]
[ FIELD <
FieldName> ]
[ VALUE <
cValue> ]
[ READONLY ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOVSCROLL ]
[ NOHSCROLL ]

SPLITBOX VERSION

EDITBOX <ControlName>
[ OF | PARENT <
ParentWindowName> ]
[ WIDTH <
nWidth> ]
[ HEIGHT <
nHeight>]
[ FIELD <
FieldName> ]
[ VALUE <
cValue> ]
[ READONLY ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ BREAK ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ NOVSCROLL ]
[ NOHSCROLL ]

Alternate Syntax:

DEFINE EDITBOX <ControlName>

[ ID <nId> ]
[ PARENT <
ParentWindowName> ]
COL <
nCol>
ROW <
nRow>
[ WIDTH <
nWidth> ]
[ HEIGHT <
nHeight>]
[ FIELD <
FieldName> ]
[ VALUE <
cValue> ]
[ READONLY < .T. | .F.> ]
[ FONTNAME <
cFontname>
[ FONTSIZE <
nFontsize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ ONGOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ONCHANGE <
OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ HELPID <
nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
[ NOVSCROLLBAR < .T. | .F.> ]
[ NOHSCROLLBAR < .T. | .F.> ]

END EDITBOX

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 EditBox value.
·   Enabled
Set / Gets enabled state of a EditBox control
·   Visible
Set / Gets visible a EditBox control.
·   Row
Set / Gets row position of a EditBox control.
·   Col
Set / Gets column position of a EditBox control.
·   Width
Set / Gets width of a EditBox control.
·   Height
Set / Gets height of a EditBox control.
·   FontName
Set / Gets EditBox control's font name.
·   FontSize
Set / Gets EditBox control's font size.
·   FontBold
Set / Gets EditBox control's font bold property
·   FontItalic
Set / Gets EditBox control's font italic property
Set / Gets EditBox control's font underline property
Set / Gets EditBox control's font strikeout property
·   FontColor
Set / Gets the foreground color for text within the EditBox
·   BackColor
Set / Gets the background color for text within the EditBox
·   ToolTip
Set / Gets EditBox control's tooltip text.
·   CaretPos
Set / Gets the caret position of a EditBox control.
·   Cargo
Set / Gets user property 'Cargo' for EditBox control
·   Name (R)
Retrieves the name of a EditBox 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)
Set the Field data of active database.
·   ReadOnly
Set / Gets EditBox control's readonly property
·   MaxLength (D)
Set the length of editorial field in signs.
·   NoTabStop (D)
Sets whether an element behavior can't receive focus and participate in the tabbing sequence
·   VScrollBar (D)
Automatically scrolls text up one page when the user presses the ENTER key on the last line.
·   HScrollBar (D)
Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line.
·   Break (D)
Control passes to the statement that follows the terminated statement.

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.

METHODS:

·   Show
Shows a EditBox control
·   Hide
Hides a EditBox control
·   SetFocus
Gives the focus to a EditBox control
·   Release
Releases a EditBox control from memory
·   Refresh
Repaint a Control
·   Save
Save data for Control EditBox
·   SaveAs
Save a EditBox control as BitMap file.

EXAMPLE:

See demos in :
\Samples\Basic\Edit
\Samples\Basic\ReadOnlyEdit
\Samples\Basic\MAINDEMO_(SYNTAX_I) to _(SYNTAX_IV)