1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    5
    Vote Rating
    0
    mayanklogin09 is on a distinguished road

      0  

    Default Unanswered: How to change background color of sencha gxt ToolTip.??

    Unanswered: How to change background color of sencha gxt ToolTip.??


    Hi,Please provide me the solution for changing the background color of ToolTip Config class.com.sencha.gxt.widget.core.client.tips.ToolTipConfig I have to change the background color to yellow.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    What have you tried? Are you using the themer, and is theme.details.tip.backgroundColor not working? Are you making your own appearance and can't change the style? Are you writing CSS and it isn't applying to the tooltip's background?

  3. #3
    Sencha User
    Join Date
    Apr 2014
    Posts
    5
    Vote Rating
    0
    mayanklogin09 is on a distinguished road

      0  

    Default


    I have tried first through CSS but I found that in ToolTipConfig there is no such method like setStylename() or addStylename() where I can set my styles. After that I tried to make one CustomToolTip class that extends ToolTipConfig and implements Tip.Appearance interface. I have implemented the method of Tip.Appearance & tried to set the style in few of its method like getElementText(Xlement parent ) but it also didn't work. Could you please tell the possible way to solve the issue.

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Can you share the custom appearance you made? That is one possible valid strategy, and should work correctly. The best way here is probably to extend the existing implementation and add your own styles to it. Check out how com.sencha.gxt.theme.base.client.field.ErrorTipDefaultAppearance extends com.sencha.gxt.theme.base.client.tips.TipDefaultAppearance and changes a few details, without changing behavior.

    You can also call getTooltip() on a component and then use addStyleName as you described. What CSS did you try?

    Finally, as I described in my first post, you can use the new theme builder and customize the tip section to use your specific background color. Did this not work? Did you get an error, or did it just not change the color correctly? What does your theme config file look like?

Thread Participants: 1

Tags for this Thread