Label setHtml bug

  1. #1

    Label setHtml bug


    here is a small bug.

    load the test screen and you can see that we set an Icon for the Label.

    as per the docs, setHtml "Sets the value of html" and should NOT affect icon. However, in this case, when we setHtml, the ICON is wiped out.

    now a simple workaround is to use setText (blah, false) but this should be fixed.


    <%@ Page Language="C#" %>
    <!DOCTYPE html>
    <head runat="server">
        <form runat="server">
            <ext:ResourceManager runat="server">
            <h1>Label Test</h1>
            <ext:Label ID="test" runat="server" Icon="Phone" Html="test stuff" MarginSpec="0 0 0 10"/>
            <ext:Button runat="server" Text="settxt" Handler="App.test.setText('<b>234</b>');" />
            <ext:Button runat="server" Text="settxt1" Handler="App.test.setText('<b>234</b>', false);" />
            <ext:Button runat="server" Text="sethtml" Handler="App.test.setHtml('<b>234</b>');" />
            <ext:Button runat="server" Text="hide" Handler="App.test.hide();" />
            <ext:Button runat="server" Text="show" Handler=";" />
  2. #2
    Hello @Z!

    I would expect the SetHtml method to wipe the icon off a button or other components. I wouldn't expect it to clear the title and titlebar icons though, if it was a panel (plain panel, grid panel, tab panel's tab names...).

    I have looked up documentation on Ext.button.Button.setHtml method and the Ext.button.Button.html config and I don't see what you pointed. If you happen to have a link/URL to the documentation claiming that it shouldn't remove icons, could you post it here? Maybe there's something else to it.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Bug in fieldcontainer when using label align top
    By Akpenob in forum 2.x Premium Help
    Replies: 3
    Last Post: Jun 24, 2014, 3:24 PM
  2. HtmlEditor with label in fieldset layout bug
    By PetrSnobelt in forum 1.x Help
    Replies: 2
    Last Post: Jun 24, 2011, 11:50 AM
  3. [CLOSED] Formpanel and Label (bug?)
    By CMA in forum 1.x Premium Help
    Replies: 1
    Last Post: Aug 26, 2009, 8:26 AM
  4. label and setHTML missing?
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Apr 29, 2009, 10:24 PM
  5. [CLOSED] Help Cant set SetHtml in a panel?
    By Jurke in forum 1.x Premium Help
    Replies: 2
    Last Post: Dec 18, 2008, 6:52 AM

Posting Permissions