Results 1 to 2 of 2

Thread: CSS on TextButton not working properly

  1. #1
    Sencha User
    Join Date
    May 2014
    Posts
    1

    Default CSS on TextButton not working properly

    I'm working on a project which was made using GWT components but now I want to change to GXT components.
    For some reason the CSS doesn't work properly on my GXT TextButtons.
    Button:

    TextButton test = new TextButton("Test");
    test.setStyleName("testStyle");

    Result
    nd8S8.png
    As you can see, the css is applied but only around the button. Have I missed something?

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737

    Default

    What changes are you applying? GXT buttons are more complex than a single <button> element in order to be completely consistent cross browser, and support other features like split menus, icons, etc.

    Have you tried the GXT 3.1 theme builder to see if it can generate your icons from just config settings, rather than getting the CSS right for each browser?

    If you really want to build your own button HTML/CSS, look into implementing a custom button Appearance implementation, so that you can *completely* control the html, css, and basic behavior of your buttons.

    Check out these guides for more details on the theme builder and appearances:
    http://docs.sencha.com/gxt/3.1/conce...meBuilder.html
    http://docs.sencha.com/gxt/3.1/conce...earance_3.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •