Cannot change foreground of disabled combobox

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Cannot change foreground of disabled combobox

Postby dfrazier » Thu Jul 26, 2012 4:10 pm

I am working on a web application that displays a lot of data to the user in comboboxes. Some users do not have permission to make changes. Some do. When the user does not have permission to make changes, the comboboxes are disabled (good). That means the text is grayed out. Unfortunately, when the text is grayed out it is harder to read. I want to be able to change the foreground text color to black (#000000) so it is easier to read. I am able to do this programmatically like this:
elements.combobox1.fgcolor="#000000"

This works fine if the user is using Firefox, Safari, or Chrome. The combobox text turns black, it is readable, and the element remains disabled (good 8) ). However... if the user is using MS Internet Explorer, this exact same code does not change the combobox color. The text remains gray (not good :( ). Is there some way to fix this problem or work around it? Most of my users use Internet Explorer and will probably resist changing to another browser.
This is my signature.
User avatar
dfrazier
 
Posts: 40
Joined: Fri Jun 29, 2012 3:43 pm
Location: Earth

Re: Cannot change foreground of disabled combobox

Postby jdbruijn » Fri Jul 27, 2012 4:42 pm

You could put a label behind the combobox on the same dataprovider and when a user (who may not edit these fields) opens this form you could hide the combobox and show the label.
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: Cannot change foreground of disabled combobox

Postby dfrazier » Fri Jul 27, 2012 9:41 pm

I suppose if that is the only option, it would probably work. There are a lot of elements on this form though. Tons! It will take a long time to fix it. It will also make the form seem very cluttered in Servoy developer with all the overlapping elements. If a better solution exists, I would love to hear it!

I am curious why this is even a problem in the first place. Is this a Servoy defect? IE strangeness?
This is my signature.
User avatar
dfrazier
 
Posts: 40
Joined: Fri Jun 29, 2012 3:43 pm
Location: Earth

Re: Cannot change foreground of disabled combobox

Postby jdbruijn » Sat Jul 28, 2012 10:01 am

dfrazier wrote:I am curious why this is even a problem in the first place. Is this a Servoy defect? IE strangeness?

i would guess it is a M$ problem. We were also not happy how IE shows disabled buttons, so we ended up adding a greyed img label behind all buttons and hide the normal button instead of disabling them. If there is a better solution I would also love to hear it.
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: Cannot change foreground of disabled combobox

Postby Peter de Groot » Sat Jul 28, 2012 12:03 pm

Hi,

Maybe this post can help
https://www.servoy.com/forum/viewtopic.php?f=2&t=17826

Regards,

Peter
User avatar
Peter de Groot
 
Posts: 215
Joined: Thu Jan 10, 2008 8:38 pm
Location: Not sure...

Re: Cannot change foreground of disabled combobox

Postby Harjo » Sat Jul 28, 2012 5:26 pm

Peter, that is for smartclient! I would file it into the servoy support system if behaviour in IE is very different than other browsers
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Cannot change foreground of disabled combobox

Postby Peter de Groot » Sat Jul 28, 2012 6:25 pm

Harjo you are right, I should RTFP...


Peter
User avatar
Peter de Groot
 
Posts: 215
Joined: Thu Jan 10, 2008 8:38 pm
Location: Not sure...


Return to Web Development

Who is online

Users browsing this forum: No registered users and 5 guests