View Full Version : Set icon for window
16 Aug 2011, 3:21 AM
I was wondering if there is a way to actually set a fixed icon for a window like it is possible for buttons using the "icon" config. We have quite a lot of icons (that can also be dynamically changed within our application), so I find the "iconClass" config pretty much useless here...
I would appreciate some insight. Thank you all in advance!
16 Aug 2011, 4:27 AM
setIconCls( String newIconCls ) : void
Set the iconCls for the panel's header. See Ext.panel.Header.iconCls. It will fire the iconchange event after completion.
newIconCls : String
The new CSS class name
16 Aug 2011, 4:29 AM
I'm aware of the iconCls, but how am I supposed to handle dynamically changeable window icons with icon classes? I would simply like to set the icon without having to create a css class for every icon I have. Especially as they can be manually changed via our UI.
16 Aug 2011, 4:47 AM
ok, got the problem now.
there might be a lot css classes in that case. maybe you can go for an override, reimplementing the 3.x icon config.
16 Aug 2011, 5:46 AM
That may be one way, but I would really prefer Sencha to re-implement the feature directly. I might have to use up some credits for that some time since we really don't have any time to implement it ourselves ...
Maybe I'll get a comment from the dev team or someone else on the issue some time this week. I'll be off headbanging at SBOA for now ;-)
8 Nov 2011, 11:10 AM
I was looking through the Ext3 features a few days ago and noticed that Ext3 didn't actually have an icon config for windows either. The question is: where did I see it?
Anyhow: I have actually pretty dirtily faked setIcon() into my custom window implementation by setting the icon class with setIconCls() and then applying my own background-image to the generated icon container. Not the most beautyful way to do it, but for now it does the trick until I find the time to somehow implement customized window headers...
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.