VS:CreateIconPushButton: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
m (Transfer Orso to _c_)
 
(One intermediate revision by the same user not shown)
Line 48: Line 48:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<remark>
<remark>
This routine is not recognized under VW 12.5 Fundamentals (might be VW 12.5.1)</remark>
([[User:CBM-c-|_c_]], 2014.09.17):
The routine still works under VW 2014, but not in VW 2015.
 
([[User:CBM-c-|_c_]], 2007.04.09):
This routine is not recognized under VW 12.5 Fundamentals (might be VW 12.5.1)
</remark>


-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Line 73: Line 78:
RUN(Example);
RUN(Example);
</code>
</code>
==== Python ====
==== Python ====
<code lang="py">
<code lang="py">
Line 90: Line 96:
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
<version>
<version>
Availability: from VectorWorks12.5
Availability: from VectorWorks 12.5
Deprecated: [[VS:Vectorworks 2012 Deprecated Functions|Vectorworks 2012]]
Deprecated: [[VS:Vectorworks 2012 Deprecated Functions|Vectorworks 2012]]
</version>
</version>

Latest revision as of 05:12, 30 December 2020

.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

(_c_, 2014.09.17):

The routine still works under VW 2014, but not in VW 2015.

(_c_, 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 VectorWorks 12.5

Deprecated: Vectorworks 2012