How to change the color of a button in Dundas Dashboard v 2.5 on Click -


how can change color of button in dundas dashboard v 2.5 on click. know have on click interaction , have assign fill property.

how using linear gradient brush.

thanks suggestions in advance!

there 2 ways linear gradient brush can set fill property to.

1) if need dynamic, build brush ground using script. instance:

dashboardlineargradientbrush b = new dashboardlineargradientbrush(); b.startpoint = new point (0,0); b.endpoint = new point(0,1);  dashboardgradientstop stop = new dashboardgradientstop(colors.black, 0); b.gradientstops.add(stop);  stop = new dashboardgradientstop(colors.white, 1.0); b.gradientstops.add(stop);  button1.fill = b; 

2) if you're switching between predefined colors, create rectangle shape outside dashboard canvas , set brush on rectangle. then, when want switch color, can in on click interaction:

button1.fill = rectangle1.fill; 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -