0 Replies Latest reply on Aug 11, 2008 6:24 AM by chrysknight

    setStyle on themeColor has no immediate effect?

    chrysknight
      Hi,

      I'm attempting to set the themeColor of a text input field dynamically. E.g.
      textInput.setStyle("themeColor", "#FF0000");

      However, the only takes effect if the text input first loses focus and then regains focus (e.g. click on something else and then click back). Trying the following after the above also seems to have no effect:
      textInput.styleChanged("themeColor");
      textInput.validateNow();
      textInput.invalidateDisplayList();

      Where am I going wrong? Surely its possible to change the themeColor dynamically at run-time without the need to jump back and forth between field focus. I did try this:

      textInput.setStyle("themeColor", "#FF0000");
      someOtherField.setFocus();
      textInput.setFocus();

      but this highlights all of the text in the input field upon focus which isn't what I want either.

      Any help most appreciated! Thanks...