VS:CreateIconPushButton: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
(add remark: died under VW 2015) |
||
Line 48: | Line 48: | ||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ||
<remark> | <remark> | ||
This routine is not recognized under VW 12.5 Fundamentals (might be VW 12.5.1)</remark> | ([[User:Orso.b.schmid|Orso]], 2014.09.17): | ||
The routine still works under VW 2014, but not in VW 2015. | |||
([[User:Orso.b.schmid|Orso]], 2007.04.09): | |||
This routine is not recognized under VW 12.5 Fundamentals (might be VW 12.5.1) | |||
</remark> | |||
----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
Revision as of 04:50, 17 September 2014
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
DEPRECATED after Vectorworks2012. See AddButtonMode or CreateImagePushButton for a replacement.
Creates an icon push button with the specified icon ID and width in characters.
PROCEDURE CreateIconPushButton(
nDialogID :LONGINT;
nComponentID :LONGINT;
nIconID :INTEGER;
nWidthInChars :INTEGER);
def vs.CreateIconPushButton(nDialogID, nComponentID, nIconID, nWidthInChars): return None
Parameters
nDialogID LONGINT nComponentID LONGINT nIconID INTEGER the index of the ICN# resource in the currently open rsrc file (or qtr on Windows) nWidthInChars INTEGER
Remarks
(Orso, 2014.09.17):
The routine still works under VW 2014, but not in VW 2015.
(Orso, 2007.04.09): This routine is not recognized under VW 12.5 Fundamentals (might be VW 12.5.1)
Example
VectorScript
PROCEDURE Example; VAR dialog1 :INTEGER; result :INTEGER; boo :BOOLEAN; PROCEDURE Dialog_Handler(VAR item :LONGINT; data :LONGINT); BEGIN END; BEGIN boo := SetVSResourceFile('IP Resources'); dialog1 := CreateLayout('Example Dialog', FALSE, 'OK', 'Cancel'); CreateIconPushButton(dialog1, 4, 11021, 20); SetFirstLayoutItem(dialog1, 4); result := RunLayoutDialog(dialog1, Dialog_Handler); END; RUN(Example);
Python
def Dialog_Handler( item , data ): pass def Example(): boo = vs.SetVSResourceFile('IP Resources') dialog1 = vs.CreateLayout('Example Dialog', False, 'OK', 'Cancel') vs.CreateIconPushButton(dialog1, 4, 11021, 20) vs.SetFirstLayoutItem(dialog1, 4) result = vs.RunLayoutDialog(dialog1, Dialog_Handler) Example()
Version
Availability: from VectorWorks12.5
Deprecated: Vectorworks 2012