Article | 60002108 |
Type | Wish |
Product | WebJS |
Version | 6026 |
Date Added | 12/31/2013 12:00:00 AM |
Fixed | (1/7/2014 12:00:00 AM) |
Submitted by | Steve Smith |
Summary
Is there a way to have the web control initialize in white. I can’t seem to change the background until a drawing is loaded.
Solution
Since the 6027 version of the vdWeb library you’ll be able to define the canvas color by using the vdmanager.AttachCanvas() method with a fourth parameter. The parameters are canvasID, width, height and the new bkcolor. bkcolor is a three dimensional array that describes a color (r,g,b). Alpha values are not supported, so there is no transparency capability. Code
function vdrawInitPageLoad() { vdmanager.AttachCanvas('canvas1', 400, 400, new Array(0, 255, 0)); }