This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Large Icons for ToolBar

Oct 14th, 2004, 05:31 AM

How do I configure commands to they use large icons for ToolBar and small (16x16) for menus. Also how do I add differenet views to Toolbar as Toggle Buttons. Similar to Show Window menu but Toggle buttons on Toolbar?

You want a custom CommandButtonConfigurer applied to toolbar buttons. See DefaultCommandServices for how they are applied: you will want to set the button's icon to the large variant in the configure method.

Currently there are no setter methods for changing the configurers but I can add those.

I am also considering adding support for multiple face descriptors per command, but I have to think about that from a configuration standpoint (don't want to introduce complexity in command configuration if possible)

Comment

Thanks, I have looked DefaultButtonConfigurer and tried to implement it. But I guess I am not sure how to set the large icon on button as I don't know what command key was used? What I really want to do is able to specify icons in images.properties like

Comment

Hmm... yea, I see what you mean. I'll see what I can do here: the simplest addition would be to enhance the CommandFaceDescriptor class: specifically, add a "large" command button icon info property, in addition to the existing buttonIconInfo property.

I think it will also be beneficial to provide multiple face descriptors per command, to support different visual configurations for the same command.