|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Toolbar appearance at runtimeHi 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. Show quote "Thierry" <tblanchard'AT'deltares.fr> escribió en el mensaje news:OMrKW9X0EHA.1652@TK2MSFTNGP11.phx.gbl... > 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 > 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. "Carlos J. Quintero [MVP]" <carlosq@NOSPAMsogecable.com> a écrit dans le message de news: OXbv22h0EHA.2***@TK2MSFTNGP15.phx.gbl...Show quote > 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. > > -- > > Carlos J. Quintero > > The MZ-Tools all-in-one add-in, now for .NET: http://www.mztools.com > > > "Thierry" <tblanchard'AT'deltares.fr> escribió en el mensaje > news:OMrKW9X0EHA.1652@TK2MSFTNGP11.phx.gbl... >> 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 >> > > |
|||||||||||||||||||||||