How to show Color Picker value (draw zone)
Hello to all
How to make a selection of Color Picker direct the user can see the selected color? In my example - the color selected by Color Picker should paint the square. Any variants ? Preferably with DOM.
var wColor= new Window('dialog', ' ');
wColor.orientation = "column";
wColor.alignment="top";
wColor.spacing=0;
wgr1=wColor.add('group');
wgr1.orientation = 'row';
wgr1.alignment='top';
btnRGB1= wgr1.add('button',undefined,'RGB');
btnRGB1.preferredSize = [50,20];
p1 = wgr1.add("panel", undefined, "", {borderStyle:"silver"});
p1.preferredSize = [22,22];
wgr2=wColor.add('group');
wgr2.orientation = 'row';
wgr2.alignment='top';
btnRGB2= wgr2.add('button',undefined,'RGB');
btnRGB2.preferredSize = [50,20];
p2 = wgr2.add("panel", undefined, "", {borderStyle:"silver"});
p2.preferredSize = [22,22];
btnRGB1.onClick = function(){//-------------------------------------------------------
app.showColorPicker();
}
btnRGB2.onClick = function(){//-------------------------------------------------------
app.showColorPicker();
}
wColor.show()