@...BTNTEXTBOX
DEFINE BTNTEXTBOX
Creates a btntextbox control.
  

A BtnTextBox is a TextBox control attached with button at the end of the textbox.

SYNTAX

Standard Window:

@ <nRow> ,<nCol> BTNTEXTBOX <ControlName>
[ ID <
nId> ]
[ OF | PARENT | DIALOG <
ParentWindowName> ]
[ HEIGHT <
nHeight> ]
[ WIDTH <
nWidth> ]
[ FIELD <
FieldName> ]
[ VALUE <
nValue> ]
[ ACTION | ON CLICK | ONCLICK <
ActionProcedureName> | <bBlock> ]
[ ACTION2 <
Action2ProcedureName> | <bBlock>
[ PICTURE
| IMAGE <cBitmapName> | <acBitmapName>]
[ BUTTONWIDTH <
nButtonWidth> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText>|<acToolTipText> ]
[ BACKCOLOR <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE | LOWERCASE ]
[ NUMERIC | PASSWORD ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ DISABLEEDIT ]
[ NOTABSTOP ]
[ HELPID <
nHelpId> ]

Dialog Window:

REDEFINE BTNTEXTBOX <ControlName>
ID <
nId>
[ OF | PARENT | DIALOG <
ParentWindowName> ]
[ FIELD <
FieldName> ]
[ VALUE <
nValue> ]
[ ACTION | ON CLICK | ONCLICK <
ActionProcedureName> | <bBlock> ]
[ ACTION2 <
Action2ProcedureName> | <bBlock>
[ PICTURE <
cBitmapName> | <acBitmapName>]
[ BUTTONWIDTH <
nButtonWidth> ]
[[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText>]
[ BACKCOLOR <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE | LOWERCASE ]
[ NUMERIC | PASSWORD ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ DISABLEEDIT ]
[ NOTABSTOP ]
[ HELPID <
nHelpId> ]

Alternate Syntax:

DEFINE BTNTEXTBOX <BtnTextBoxName>

[ ID <nId> ]
[ PARENT <
ParentWindowName> ]
COL <
nCol>
ROW <
nRow>
WIDTH <
nWidth>
HEIGHT <
nHeight>
[ FIELD <
FieldName> ]
[ VALUE <
nValue> ]
[ ACTION <
ActionProcedureName> | <bBlock> [ DEFAULT ]
[ ACTION2 <
Action2ProcedureName> | <bBlock>
[ PICTURE <
cBitmapName> | <acBitmapName>]
[ BUTTONWIDTH <
nButtonWidth> ]
[ FONTNAME <
cFontname>
[ FONTSIZE <
nFontsize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <
cToolTipText>|<acToolTipText ]
[ BACKCOLOR <
aBackColor> ] // * or <aBackColor,aReadOnlyBackColor>
[ FONTCOLOR <
aFontColor> ] // * or <aFontColor,aReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE < .T. | .F.> | LOWERCASE< .T. | .F.> ]
[ NUMERIC < .T. | .F.>  | PASSWORD < .T. | .F.> ]
[ ONGOTFOCUS <OnGotFocusProcedur> | <bBlock> ]
[ ONCHANGE <
OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ONENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN  < .T. | .F.> ]
[ INVISIBLE < .T. | .F.> ]
[ DISABLEEDIT < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
[ HELPID <
nHelpId> ]

END BTNTEXTBOX

DESCRIPTION:

nRow, nCol
Position in the area of ??the window in pixels.
nWidth, nHeigth
The desired size of the BtnTextBox Control in pixels.
nId
The ID identifier this Control in Dialog Window
BtnTextBoxName
A reference to the BtnTextBox Control
ParentWindowName
A reference to the Parent Window.
Field
A Field Name expressions for the Button.
cFontname, nFontsize
A reference to the Font name and size .
OnGotFocusProcedure
An action to be performed when Button is focused.
OnLostFocusProcedure
An action to be performed when BtnTextBox is lost focused.
OnEnter
An action to be performed when Enter clicking.
INVISIBLE
The visibility property specifies whether or not a control is visible
DISABLEEDIT
This property disables (or enables) the ability to edit data fields, data are entered using the function button


PROPERTIES:

·   Value
Set / Gets BtnTextBox value.
·   Enabled
Set / Gets enabled state of a BtnTextBox control
·   Visible          
Set / Gets visible a BtnTextBox control.
·   Row
Set / Gets row position of a BtnTextBox control.
·   Col   
Set / Gets column position of a BtnTextBox control.
·   Width
Set / Gets width of a BtnTextBox control.
·   Height
Set / Gets height of a BtnTextBox control.
·   Action
Set / Gets action of a BtnTextBox control..
·   FontName
Set / Gets BtnTextBox control's font name.
·   FontSize
Set / Gets BtnTextBox control's font size.
·   FontBold
Set / Gets BtnTextBox control's font bold property
·   FontItalic
Set / Gets BtnTextBox control's font italic property
Set / Gets BtnTextBox control's font underline property
Set / Gets BtnTextBox control's font strikeout property
·   FontColor
Set / Gets the foreground color for text within the BtnTextBox
·   BackColor
Set / Gets the background color for text within the BtnTextBox
·   ToolTip
Set / Gets BtnTextBox control's tooltip text.
·   Picture
Set / Gets image name of a button control.
·   CaretPos
Set / Gets the caret position of a BtnTextBox control.
·   Cargo
Set / Gets user property 'Cargo' for BtnTextBox control
·   Name (R)
Retrieves the name of a BtnTextBox 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)
Sets a value indicating whether the input must be fully numeric
·   Password (D)
Sets the password currently held by the BtnTextBox
·   MaxLength (D))
Sets the maximum number of characters allowed in a text field
·   NoTabStop (D)
Sets whether an element behavior can't receive focus and participate in the tabbing sequence
·   UpperCase (D)
Transforms all characters to uppercase
·   LowerCase (D)
Transforms all characters to lowercase
·   RightAlign (D)
Specifies the horizontal alignment of the content of text to the right.

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
·   OnClick
Action to be performed when generic clicking of the button of control
·   Action2
Action to be performed when generic clicking of the 2th button of control

METHODS:

·   Show
Shows a BtnTextBox control
·   Hide
Hides a BtnTextBox control
·   SetFocus
Gives the focus to a BtnTextBox control
·   Release
Releases a BtnTextBox 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 BtnTextBox
·   SaveAs
Save a BtnTextBox control as BitMap file.

EXAMPLE:

See demo in :
\samples\basic\ButtonTextBox