Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » disabled/read-only Text theming
disabled/read-only Text theming [message #122242] Mon, 23 February 2009 03:38 Go to next message
Jim Tilley is currently offline Jim TilleyFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,
I would like to set the background color of a disabled and/or read-only
Text widget using CSS theming.
The code is:

text1.setEnabled(false);
text2.setEditable(false);

The CSS code is:

Text:disabled {
background-color: gray;
}

but this seems to have no effect on the background color.
Any ideas would be appreciated.
Thanks!
-Jim
Re: disabled/read-only Text theming [message #122253 is a reply to message #122242] Mon, 23 February 2009 10:10 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Jim,

I'm very thankful for comments like this, as they reveal what people are
actually struggling with.

Jim Tilley wrote:
> Hi,
> I would like to set the background color of a disabled and/or read-only
> Text widget using CSS theming.

For the read-only part of your question, the Text widget does not have a
CSS state "read-only" yet. If you need it, feel free to file a bug for
this problem. It shouldn't be hard to implement this state.

> text1.setEnabled(false);
> text2.setEditable(false);
>
> The CSS code is:
>
> Text:disabled {
> background-color: gray;
> }

This should work, but I see that it currently doesn't. There must be a
bug in the theming. Could you file a bug report for this too?

Best regards, Ralf
Re: disabled/read-only Text theming [message #122264 is a reply to message #122253] Mon, 23 February 2009 10:30 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

>> text1.setEnabled(false);
>> text2.setEditable(false);
>>
>> The CSS code is:
>>
>> Text:disabled {
>> background-color: gray;
>> }
>
> This should work, but I see that it currently doesn't. There must be a
> bug in the theming. Could you file a bug report for this too?

The reason is that the :disabled state is missing from most widgets,
including Text. As a result, *:disabled works, but Text:disabled
doesn't. However, this is worth a bug.

Ralf
Re: disabled/read-only Text theming [message #122318 is a reply to message #122264] Mon, 23 February 2009 16:18 Go to previous messageGo to next message
Jim Tilley is currently offline Jim TilleyFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks Ralf!
I'll file the bug.
-Jim
Re: disabled/read-only Text theming [message #122327 is a reply to message #122318] Mon, 23 February 2009 16:31 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Jim,

Jim Tilley wrote:
> Thanks Ralf!
> I'll file the bug.

just noticed that the :disabled bug exists already:

257548: [Theming] Add disabled state for themeable widgets
https://bugs.eclipse.org/bugs/show_bug.cgi?id=257548

Ralf
Re: disabled/read-only Text theming [message #122507 is a reply to message #122327] Tue, 24 February 2009 19:18 Go to previous messageGo to next message
Jim Tilley is currently offline Jim TilleyFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks Ralf,
Would the Text read-only state also be fixed under bug 257548 or would you
like me to open a separate bug?
-Jim
Re: disabled/read-only Text theming [message #122536 is a reply to message #122507] Tue, 24 February 2009 20:20 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Jim,

Jim Tilley wrote:
> Would the Text read-only state also be fixed under bug 257548 or would
> you like me to open a separate bug?

No, that's a different issue and should be reported in a bug of its own.

Thanks, Ralf
Previous Topic:parent.qx.ui is null error in IE
Next Topic:Mobile phones support (Symbian)
Goto Forum:
  


Current Time: Wed Dec 08 13:33:03 GMT 2021

Powered by FUDForum. Page generated in 0.02120 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top