@...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
OnActionProcedure> | <bBlock> ]
[ ACTION2 <
OnAction2Procedure> | <bBlock>
[ PICTURE | IMAGE <
cBitmapName> | <acBitmapName>]
[ BUTTONWIDTH <
nButtonWidth> ]
[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> | <acToolTipText> ]
[ BACKCOLOR <
anBackColor> ] // * or <anBackColor,anReadOnlyBackColor>
[ FONTCOLOR <
anFontColor> ] // * or <anFontColor,anReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE | LOWERCASE ]
[ NUMERIC | PASSWORD ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ DISABLEEDIT ]
[ NOTABSTOP ]
[ NOKEEPFOCUS ]
[ HELPID <
nHelpId> ]
[ CUEBANNER | PLACEHOLDER <
cCueText> ]

Dialog Window:

REDEFINE BTNTEXTBOX <ControlName>
ID <
nId>
[ OF | PARENT | DIALOG <
ParentWindowName> ]
[ FIELD <
FieldName> ]
[ VALUE <
nValue> ]
[ ACTION | ON CLICK | ONCLICK <
OnActionProcedure> | <bBlock> ]
[ ACTION2 <
OnAction2Procedure> | <bBlock>
[ PICTURE <
cBitmapName> | <acBitmapName>]
[ BUTTONWIDTH <
nButtonWidth> ]
[[ FONT <
cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <
cToolTipText> ]
[ BACKCOLOR <
anBackColor> ] // * or <anBackColor,anReadOnlyBackColor>
[ FONTCOLOR <
anFontColor> ] // * or <anFontColor,aRneadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE | LOWERCASE ]
[ NUMERIC | PASSWORD ]
[ ON GOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <
OnEnterProcedure> | <bBlock> ]
[ RIGHTALIGN ]
[ INVISIBLE ]
[ DISABLEEDIT ]
[ NOTABSTOP ]
[ NOKEEPFOCUS ]
[ HELPID <
nHelpId> ]
[ CUEBANNER | PLACEHOLDER <
cCueText> ]

Alternate Syntax:

DEFINE BTNTEXTBOX <BtnTextBoxName>

[ ID <nId> ]
[ PARENT <
ParentWindowName> ]
COL <
nCol>
ROW <
nRow>
WIDTH <
nWidth>
HEIGHT <
nHeight>
[ FIELD <
FieldName> ]
[ VALUE <
nValue> ]
[ ACTION <
OnActionProcedure> | <bBlock> [ DEFAULT ]
[ ACTION2 <
OnAction2Procedure> | <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 <
anBackColor> ] // * or <anBackColor,anReadOnlyBackColor>
[ FONTCOLOR <
anFontColor> ] // * or <anFontColor,anReadOnlyFontColor>
[ MAXLENGTH <
nInputLength> ]
[ UPPERCASE < .T. | .F.> | LOWERCASE< .T. | .F.> ]
[ NUMERIC < .T. | .F.>  | PASSWORD < .T. | .F.> ]
[ ONGOTFOCUS <
OnGotFocusProcedure> | <bBlock> ]
[ ONCHANGE <
OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]
[ ONENTER <O
nEnterProcedure> | <bBlock> ]
[ RIGHTALIGN  < .T. | .F.> ]
[ INVISIBLE < .T. | .F.> ]
[ DISABLEEDIT < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
[ NOKEEPFOCUS < .T. | .F.> ]
[ HELPID <
nHelpId> ]
[ CUEBANNER | PLACEHOLDER <cCueText> ]

END BTNTEXTBOX


DESCRIPTION:

nRow, nCol
Position in the area of ??the window in pixels.
nWidth, nHeight
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.
nHelpId
The help topic identifier for this Control
Field
A Field Name expressions for the Button.
nValue
Specifies a startup value for the BtnTextBox control
cFontName, nFontSize
A reference to the Font name and size .
OnGotFocusProcedure
An action to be performed when BtnTextBox as Got Focused.
OnLostFocusProcedure
An action to be performed when BtnTextBox as Lost Focused.
OnEnterProcedure
An action to be performed when Enter/clicking the BtnTextBox
anBackColor
Specifies a Background Color
anFontColor
Specifies a Font Color
anReadOnlyBackColor
Specifies a Background Color for READONLY mode
anReadOnlyFontColor
Specifies a Font Color for READONLY mode
cToolTipText
Specifies the Text for the ToolTip
acToolTipText
?
cBitmapName
Specifies the name of the bitmap for the Button
nInputLength
Specifies the length of the input
nButtonWidth
Specifies the Button Width
OnActionProcedure
Action to be performed when Button1 is Clicked
OnAction2Procedure
Action to be performed when Button2 is Clicked
 
 
UPPERCASE
Specifies whether character will be automatically converted to uppercase
LOWERCASE
Specifies whether character will be automatically converted to lowercase
NUMERIC
Specifies whether the input is a numeric value
PASSWORD
Specifies whether the input of the data will be replaced by "*"
RIGHTALIGN
Specifies whether the content of the control will be right aligned
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
NOTABSTOP
Stop the control to receive focus and participate in the tabbing sequence


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
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
·   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