Toolbar appearance at runtime

T

Thierry

Hi all,

i've created a toolbar that contains images taken from .ico files (having
16x16, 32x32 and 48x48).
How can I:
- change the icons size
- toggle on/off text for each button
at runtime ?

For the #1 point, I tried changing ImageList.ImageSize but my icons
disappear.

Any idea ?
thanks,
Thierry
 
C

Carlos J. Quintero [MVP]

1) I don´t think that the ImageList supports icons with several image sizes.
So, it is better to use different ImageList controls, one for 16x16 and
other for 32x32, etc. Then you change the ImageList at run-time:

ToolBar1.ImageList = ...

2) Use

ToolBar1.Buttons.Item(0).Text = ""
ToolBar1.Buttons.Item(1).Text = ""

etc.
 
T

Thierry

it does in the designer window. When I change ImageList.ImageSize in the
toolbar property window, the icons change.
But it seems it does not work at runtime.
 

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