Multiple size images

Bars for Windows Forms Forum

Posted 13 years ago by Marianne
Avatar
I have a toolbar that displays 24x24 images instead of 16x16. However, I want the menu bar images to remain at 16x16. Presently, there seems to be no way to do this via the ImageList method since there is only one ImageList property. So, if I use the ImageList for the 16x16 images, then I need to actually insert the images via the Image property for the 24x24 images.

Can you add another property called LargeImageList in the ToolBarManager? That way, the same index number can be used to indicate both sizes for the menu bar and toolbar respectively. Do you understand what I mean?

------------------------------- Marianne

Comments (7)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
How would you envision being able to select which ImageList gets used for a menu or toolbar?


Actipro Software Support

Posted 13 years ago by Marianne
Avatar
Maybe each toolbar/menubar can have an additional bool property called "UseLargeIcons" or something along those lines. Or to make it even simpler, Maybe add an ImageList property to each menubar and dockable toolbar. If it's left null then use the ToolbarManager imagelist but if its specified then use that one instead.

------------------------------- Marianne

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Probably putting an override on each toolbar is the way to go.


Actipro Software Support

Posted 13 years ago by Marianne
Avatar
The only issue I see with this are when a user creates a customized toolbar does it use the toolbar manager's setting or would there be a way to specify to use larger icons?

Ultimately, I am going to offer the user a choice as to whether to use large or small icons on the toolbar so it will be at runtime that the determination will be made to use the override on each toolbar or not. My only question is how this will work with customized toolbars.

------------------------------- Marianne

Posted 13 years ago by Marianne
Avatar
Sticking with the override idea, if I set the menu bar to use a 16x16 imagelist, then the toolbar manager's imagelist can be either 16x16 (if the user wants small icons on the toolbar) or a larger one. In that case, customized toolbars should use the toolbar manager default. So if a MenuBar as well as DockableToolbars can use the imagelist override and all customized toolbars use the toolbar manager default then it doesn't seem as if there would be any issues with that.

The only concern would be to ensure that the imagelist can be changed at runtime and the toolbars would update themselves accordingly with the new icons.

------------------------------- Marianne

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
So for the TODO list description, basically we just need to be able to set an ImageList "override" to a DockableToolBar and MenuBar. If it is null, the default one on BarManager is used. If the "override" changes, the toolbar must perform a layout. Does that cover it?


Actipro Software Support

Posted 13 years ago by Marianne
Avatar
Yes, I believe that covers it. Thanks!

------------------------------- Marianne

The latest build of this product (v2018.1 build 0341) was released 9 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.