Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Change the font color of a button without css

    Good evening!

    Say me, please, may i do this operation?

    I can set color to background by setBackgroudColor(String color), but button has not similar method for ForegroundColor

    #2
    By foreground color, do you mean the color of the button text/title?

    If so, you can use html tags in button titles (and just about anywhere for that matter). If so, you can use in-line styling.

    something like:
    Code:
    myBtn.setTitle("<span style='color:#336633;'>BtnTitle</span>");
    I haven't tested this... let me know.

    Comment


      #3
      Also - depending on the skin being used, setBackgroundColor on a button may not do much since some buttons use stretchImages. If you'd like to try it out, try it out on a regular Button class instead of IButton for example.

      Comment


        #4
        Using of in-line styling works :) Thank you!

        Comment

        Working...
        X