PDA

View Full Version : How do i remove a setIconStyle



TheBuzzer
13 Aug 2008, 8:40 AM
I want to remove the setIconStyle from a ContentPanel

if I try using setIconStyle(null) or setIconStyle("") it does not work and causes tooltip buttons to show up which is a bit weird

So anyone know the default setIconStyle?

gslender
6 Sep 2008, 3:51 PM
Buzzer,

I've submitted the patch below to Darrell - so if he takes it up, then hopefully this will be in a relase not too far away.


Index: Header.java
===================================================================
--- Header.java (revision 796)
+++ Header.java (working copy)
@@ -124,6 +124,17 @@
}

/**
+ * Removes the header's icon style.
+ */
+ public void removeIconStyle() {
+ this.iconStyle = "";
+ if (rendered) {
+ textEl.removeStyleName("x-panel-icon");
+ iconBtn.setVisible(false);
+ }
+ }
+
+ /**
* Sets the header's text.
*
* @param text the new text