[CLOSED] Changing StyleSpec of Label

  1. #1

    [CLOSED] Changing StyleSpec of Label

    In my page, I have the following label control:

    <ext:Label ID="lblTest" StyleSpec="background-color:rgb(255,255,0)" runat="server" />
    If I then want to change the label's background colour server-side via a GridPanel RowSelect AjaxEvent, I attempt to do the following:

    lblTest.StyleSpec = "background-color:rgb(255,255,100)";
    lblTest.Text = "Sample text";
    The "Sample text" is inserted in to the label, however the label's colour doesn't change - why is this? The code returned to the page is the following, so the "styleSpec" code is rendering, but just doesn't appear to run:

    {script:"lblTest.styleSpec=\"background-color:rgb(255,255,100)\";lblTest.setText(\"Sample text\",true);"}
  2. #2

    RE: [CLOSED] Changing StyleSpec of Label

    Hi danielg,

    Thanks for pointing out the problem.


    There is an issue when the StyleSpec is set during an AjaxEvent/AjaxMethod.


    I should be able to add this functionality easily.*


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Changing StyleSpec of Label

    Cool, thanks for the reply.

    Do you have an idea when this will be implemented?
  4. #4

    RE: [CLOSED] Changing StyleSpec of Label

    Do you have an idea when this will be implemented?
    It's done. SVN update, then rebuild your Coolite.Ext.Web project.*


    Hope this helps.


    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] Changing StyleSpec of Label

    Excellent, thanks for the quick fix!

Similar Threads

  1. changing label names in EventEditWindow
    By ozayExt in forum 1.x Help
    Replies: 0
    Last Post: Aug 24, 2011, 6:38 AM
  2. [CLOSED] StyleSpec für Buttons
    By macap in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Aug 24, 2010, 12:51 PM
  3. Changing Label ForeColor
    By virus in forum 1.x Help
    Replies: 2
    Last Post: Sep 21, 2009, 9:52 AM
  4. Replies: 4
    Last Post: Aug 10, 2009, 4:00 PM
  5. [CLOSED] Changing color of a combobox label
    By Sharon in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 18, 2009, 9:34 AM

Posting Permissions