Change color shape by clicking on it

Paulo Ferro shared this question 7 months ago
Answered

Hi,

I want to change a color of a square by clicking on it one time and change to the previous color by clicking a second time and so on.

i used StColor[poly1,"Black"] on the scripring. This one works. But I don't know how to get back by clicking a second time.

Comments (2)

photo
1

Définir un booléen par ex

flag=true


et modifier le script

flag=!flag
SetColor(poly1,If(flag,"Black",'Red))

photo
1

Merci beaucoup ! Ça marche !

[Topic solved]

photo
© 2020 International GeoGebra Institute