Page 1 of 1

Can shapes have a changeable style? If yes, how to change?

Posted: Thu Jul 11, 2019 12:14 pm
by Markus
Hello,

I try to bind a style, created in the StyleManager, to a shape via the onclick event (change the background color). For this I tried SetStyle and ToggleStyle. But it has no effects. The shape does not change the style.

Is it possible that ToogleStyle or SetStyle cannot be used for shapes? I want the shape to change the background color (red/blue) with every click.

Thank you very much for pointing me to a solution.

Kind Regards,
Markus

Re: Can shapes have a changeable style? If yes, how to change?

Posted: Thu Jul 11, 2019 1:07 pm
by Pablo
By default, a shape is an image so you cannot change the style of that.
If you use events then the style will be applied to the shape's container.