VS:SetColorButton

From Vectorworks Developer
Revision as of 10:37, 12 August 2013 by Root (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix


Description

Sets the color of a modern dialog color button. Set all colors to 0 for black. Set all colors to 65535 for white.
PROCEDURE SetColorButton(
dialogID  :LONGINT;
itemID  :LONGINT;
red  :LONGINT;
green  :LONGINT;
blue  :LONGINT);
def vs.SetColorButton(dialogID, itemID, red, green, blue):
    return None

Parameters

dialogID LONGINT The index of the dialog layout containing the control.
itemID LONGINT The index of the color button.
red LONGINT The red component of the color.
green LONGINT The green component of the color.
blue LONGINT The blue component of the color.

Example

VectorScript

PROCEDURE SetColorControl(dialogID, controlID :LONGINT; colorIndex :STRING);
VAR
r, g, b :LONGINT;
BEGIN
IF colorIndex <> '' THEN BEGIN
ColorIndexToRGB(Str2Num(colorIndex), r, g, b);
SetColorButton(dialogID, controlID, r, g, b);
END;
END;

Python


Version

Availability: from VectorWorks10.0

See Also

VS Functions:

VS:GetColorButton

VS Functions: [[VS:GetColorButton]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox