VS:AddButton
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Defines the standard button types (such as the OK or Cancel buttons, check boxes, radio buttons) within a custom dialog definition.
In addition to the regular button styles, there are also two "auto" button styles. These styles(check box and radio button) automatically handle user selection- deselection, and can be activated or deactivated by calling SetItemEnable.
To create a default button, assign the button an item ID of 1.
Button | Style Constant |
---|---|
Standard Button | 1 |
Check Box | 2 |
Radio Button | 3 |
Auto Check Box | 4 |
Auto Radio Button | 5 |
PROCEDURE AddButton(
buttonStr :STRING;
itemID :INTEGER;
buttonType :INTEGER;
x1 :INTEGER;
y1 :INTEGER;
x2 :INTEGER;
y2 :INTEGER);
def vs.AddButton(buttonStr, itemID, buttonType, x1, y1, x2, y2): return None
Parameters
buttonStr STRING Descriptive text for dialog button. itemID INTEGER Unique itemID for the dialog button, in a range of 1-50. buttonType INTEGER Style of dialog button control. x1 INTEGER Top left X coordinate of button bounding box. y1 INTEGER Top left Y coordinate of button bounding box. x2 INTEGER Bottom right X coordinate of button bounding box. y2 INTEGER Bottom right Y coordinate of button bounding box.
Remarks
Note: deprecated from VW 9+, use CreatePushButton, CreateCheckBox or CreateRadioButton
Example
VectorScript
{creates a check box } AddButton('Use Sound',4,3,25,60,125,80); {creates a push button that is the default button of the dialog } AddButton('OK',1,1,25,60,125,80); </pas> ==== Python ==== <code lang="py">
Version
Availability: from All Versions. Deprecated from VW 9+.
See Also
VS Functions:
VS Functions:
[[VS:SetItemEnable]]