%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
color Method
See Also  Example
vdWebLibrary Namespace > ScriptCommands Class : color Method
colorstring
A color as String colorToString
Selects the passed color as active. Commands that create new objects like line set the color of created entities to that color.

Syntax

JScript 
public function color( 
   colorstring : String
);

Parameters

colorstring
A color as String colorToString

Example

///
C#Copy Code
vdrawobj.scriptCommand.color("0,255,0");//set active color to a green value 
vdrawobj.scriptCommand.line();//all the user lines will be created with a green color
C#Copy Code
vdrawobj.scriptCommand.color("bylayer");//set active color to a green value 
vdrawobj.scriptCommand.line();//all the user lines will be created with a color flag bylayer.The entity will be draw using the color of its layer
C#Copy Code
vdrawobj.scriptCommand.color("0");//set active color to a color Index value "0" which is red. 
vdrawobj.scriptCommand.line();//all the user lines will be created with a red color

See Also