Change Shape color on click

Started by longo93, May 30, 2016, 12:33:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

longo93

Hello,

i have the idea to change the color of a shape by right click on that shape. If i have just one shape its no problem to change the color with following command in ShapeSheet ...
Actions =SETF(GetRef(FillForegnd),2)     Menu ="change color to red"

But my problem is that i have 2 rectangle shapes, one with the command to change the color and the other one should be white the whole time. if i put them together and say that the color shape should be in the foreground and group the shapes i cannot change the color and on right click i dont even have the opportunity to change the color.

Where is my mistake ?

Thanks for your help !! :)

Stephan 

bmwk100dk

Hello Stephan

I guess what you did, is that you placed the Action in one of your shapes, and then grouped them. Grouping creates a new shape with its own shapesheet, wich is why you loose acces to anything you have placed in the shapes you just grouped.
You need to place the Action in the group shapesheet, and then place a reference in the shape you want to change color. You could do like this
1. creat the shapes that you want
2. group them
3. Add Actionsettings to group shapesheet.
4. Sub select ( slow double click) the shape you want to change color
5. Open shape sheet
6. Add reference to group fillforegnd in the shapes corresponding cell.

hope this will be of use to you. I have attached a file where i have used this method.

Best regards

Bo