• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IE8 and TextBox font color?

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

I have a situation where I'm trying to change the background and text color of a GWT TextBox (GWT 2.4).

In Firefox 5, this works just fine. In IE8, it takes the background color setting of the CSS but not the foreground color.

So, my code looks like so:


The CSS portion is as follows:



Is there some sort of workaround for this? I want the "color" attribute to apply to myTextBox consistently across browsers.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are setting the style name as customTextBoxStyle but your css uses disabledtextbox
 
Joe Vahabzadeh
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, my apologies - I had an older version of the code and an older version of the CSS file where the style naming (among other things) was different. I copied the CSS from the older (wrong) version of the CSS file.

This is what it CURRENTLY looks like.

The code:


The CSS:


And with things as shown in the code snippets above, the behavior is as I've described in the original post.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you try with setStylePrimaryName instead?
 
Joe Vahabzadeh
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No difference in behavior.

Also, I should mention that:
1) There may be more things I have to do in that customTextBoxStyle in the future than I'm doing now. Already I know that I will probably be changing it to:


and it may change even further in the future

2) I will have to switch between having this style for the TextBox in question, and removing it, programmatically, based on user actions. I'm given to understand that removeStyleName(String) is not recommended and can have unintended side effects when doing so on a primary style name. To confirm, I temporarily added the new items to the style definition when trying setPrimaryStyle name... the border color setting only partially worked, if that makes sense.

But I digress - basically based on user action, I'll have to do addStyleName and removeStyleName for this style.

And I realize I'm somewhat rambling on a digressing topic because, ultimately, even using setPrimaryStyleName did not change the font color to black for the TextBox in IE8.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic