Setting shape's icon color on a custom stencil

L

L K

I run into a strange problem while creating a custom stencil.
When an object is created, a copy from a preset Visio (e.g. basic shapes) stencil is dropped in, some properties are changed, and the foreground color of the shape is modified.
At this point, I'd like to make the master shape's icon on the stencil to be of the shame color as the shape that it produces.
To do this, I call
masterCopy.putIconUpdate(visAutomatic);
before closing the master copy and the icon changes everything but the color.
Has anyone else run into this problem? Is there something special I need to do?
Thanks for any help.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
D

David Parker

The Visio master icons have a very limited color palette.
Unless you used one of the colors in the palette, then it was probably
ignored.

in message news:[email protected]...
 
L

L K

I doubt that's the problem, because if I run the plug-in and then manually open the created shape and set the icon to display the image, it works just fine. As a matter of fact, when looking through the properties the check-mark is set, and in order to trigger it to work, I must turn it off and back on. It's almost as if it needs a refresh or something.

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
N

Nikolay Belyh

I doubt that's the problem, because if I run the plug-in and then manually open the created shape and set the icon to display the image, it works just fine. As a matter of fact, when looking through the properties the check-mark is set, and in order to trigger it to work, I must turn it off and back on. It's almost as if it needs a refresh or something.

EggHeadCafe.com - .NET Developer Portal of Choicehttp://www.eggheadcafe.com

You should set "IconUpdate" property for the original master, not for
"masterCopy" you use for editing.
BTW, this property is set automatically (if you create a new master).

Kind regards, Nikolay.
 

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