AddButton Method (TOOLBAR)
PLBCMP GUI Only
The AddButton method creates a new button in a TOOLBAR object. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A TOOLBAR object to which a button is added.
return
Optional. A TOOLBUTTON object that gets the return value.
autosize
Optional. A decimal number or Numeric Variable that specifies the automatic sizing method. (see AUTOSIZE property)
btnstyle
Optional. A decimal number or Numeric Variable that specifies the button style. (see BTNSTYLE property)
enabled
Optional. A decimal number or Numeric Variable that set the buttons initial state. (see ENABLED property)
imageindex
Optional. A decimal number or Numeric Variable that specifies the image index of the button. (see IMAGEINDEX property)
partialpush
Optional. A decimal number or Numeric Variable that specifies the image index of the button. (see PARTIALPUSH property)
pushed
Optional. A decimal number or Numeric Variable that specifies the image index of the button. (see PUSHED property)
tag
Optional. A decimal number or Numeric Variable that specifies tab number of the button. (see TAG property)
visible
Optional. A decimal number or Numeric Variable that specifies the visibility of the button. (see VISIBLE property)
text
Optional. A Character String Variable or literal that specifies the text displayed on the button. (see TEXT property)
runname
Optional. A Character String Variable or literal that specifies the run time name of the button. (see RUNNAME property)
tooltip
Optional. A Character String Variable or literal that specifies the tool tip that is displayed for the button. (see TOOLTIP property)
menutext
Optional. A Character String Variable or literal that specifies the menu text for the button. (see MENUTEXT property)
userdata
Optional. A Character String Variable or literal that specifies the user defined data. (see USERDATA property)
insertAt
Optional. A decimal number or Numeric Variable that specifies the zero based index of the TOOLBAR button. (10.1B)
causevalid
Optional. A decimal number or Numeric Variable that disables or enables the CAUSEVALID event for a TOOLBUTTON being added. (10.4B)
Flags Affected: EOS, OVER, ZERO
Note the following:
If the value returned is zero, the ZERO Condition Flag is set.
The OVER and EOS Condition Flags are always cleared.
The created panel can be accessed through the BUTTONS collection.
For improved performance in the Application Server environment, do not specify the optional return value and parameters unless needed.
If ({index} is sprecified, the new TOOLBUTTON is inserted to the left of the TOOLBAR button specified by the value.
A {causevalid} of zero disables the CAUSEVALID event. A non-zero value enables the CAUSEVALID event. If this parameter is not used, the CAUSEVALID event for the TOOBUTTON being added is enabled.
See Also: Example Code, Method Syntax, TOOLBAR Methods
![]() |