Toolbar appearance at runtime

  • Thread starter Thread starter Thierry
  • Start date Start date
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
 
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.
 
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.
 
Back
Top