VS:CreateIconPushButton: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
 
m (1 revision)
(No difference)

Revision as of 14:25, 12 August 2013

.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

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