Dynamically change icon on button?

G

Guest

Is there a way to dynamically change the icon displayed on a command button.
I want the icon to change when the button is clicked. All I see in properties
is 'bitmap'. Thanks.
 
M

Marshall Barton

mscertified said:
Is there a way to dynamically change the icon displayed on a command button.
I want the icon to change when the button is clicked. All I see in properties
is 'bitmap'.

Change the Picture Type property to Linked and then set the
Picture property to the path to your icon file.
 
G

Guest

I was intending to use the builtin icons and I have no idea where they are
stored?
 
M

Marshall Barton

Those bitmaps are hidden in some file. There are icon tools
on the web that can extract them so you can create
individual icon files or libraries, but then you're back to
what I suggested.

If you have other buttons with the other bimaps, you
might(?) be able to copy the PictureData property from one
control to another, but this seems more complicated than
doing what I said earlier. Besides, if you were going to
add other buttons with various bitmaps, it would be easier
to just make one invisible and another visible.
 

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