Shape Color

B

Bob Vardell

Hello All!

I have a process chart that I did and would like to be able to have the user
right click on each step and have yes or no be choices for if the object
(task) is completed and based on yes/no, have the object change to either red
or green.

Is there an easy way to do this? Visio 2007!
 
P

Philippe C.

I use this discussion group to learn Visio. This question looked easy, so I
had a try. It is a pity that the messages are not sorted according to date
of answer.

I'll explain in in Visio 2003, I think only the name of "Custom Properties"
have changed to "Shape Data"


Select the shape. Right click. Properties. Define. Add "Completed",
name it "Completed", Type "Boolean", value "False", OK

Now be sure to be in Developer Mode.

Select the shape.
Menu, Window, Show Shapesheet.
Under "Custom Properties", You'll se a row with your new custom property.

Under section "Fill Format", you change the cell "FillForegnd" with
IF(Prop.Completed="TRUE",3,2)

Voilà. Now when it is green, you make a master of it by dragging it to a
stencil.

First I thought of using the Action Row, but i could not find the depecrated
visconstant.bas for the docmd.

Maybe this is not exactly what you want, "have yes or no be choices ". But
this is the easy way.







Select the shape.
 
P

Philippe C.

Bob, I googled you and saw the problem with the valve.

I combined the two solutions and it works.

In the EventDblClk cell you write :
=IF(Prop.Completed=TRUE,SETF("Prop.completed",FALSE),SETF("prop.completed",TRUE))

I learned a lot this morning. I am reading the SDK.
 
P

Philippe C.

,And under the Shapesheet, Miscellaneous section, in cell Comment you could
write "

"Double click to toggle ""Completed"" status right click for more properties"

The data fields can also have a prompt.
 
B

Bob Vardell

Philippe,

Thanks but the software is telling me that the formulas are in error.

If I put this:
=IF(FillForegnd=2,SETF("FillForegnd",9),SETF("FillForegnd",2))
in the eventdoubleclick area it lets me change red to green and vice versa.

I made the cell you told me, it is under "shape data". I had a pic, but no
way to attach it.

What I need to do is be able to right click on the shape and have the top
two menu choices some up as :Completed" or "Not Completed".

Also, is there a way to have a mouse over for each object with a customer
prompt?

Thanks,
Rob
 
P

Philippe C.

Bob,

you should let the property "completed" depend on the doubleclick. Then let
the Fillforegnd color follows the property.
To adapt the right click menu, there is Actions section in the Shapesheet.
But I don't know how to work with check boxes in it.

If you make the new data cell in the shapesheet, don't forget to give it a
meaningful name, in the left column.

I think you mean "hover" in your last question. The answer is the "comment"
cell.
I also vaguely remember an article on smart tags that let you have several
tips in in one shape.
 
P

Philippe C.

In my matinal hurry to give a quick answer I was not precise enough.

It is of course not necessary to add an extra data "completed", but working
with senseless colours is hum hum, bad practice.

Also when "manually" defining a new property it is best to give it a
meaningful label AND name. "Completed" is better as eg "Property17"

Ik had another look at the Smart Tags.
Select shape, Shapesheet, menu, Insert Section, Smart tag.
But for other uses than as a tooltip, I should have another look.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top