default widget color [message #120780] |
Tue, 21 March 2006 01:02 |
Eclipse User |
|
|
|
Originally posted by: nospam.thanks.com
using VE1.2.0.v20060227_S
try this :
place a button in a shell.
look at it's background & foreground color : it's seem to be hardcoded.
"Color {212, 208, 200}" but in fact it's not.
set the value to COLOR_WIDGET_BACKGROUND and now you got a generated line:
" button.setForeground(Display.getCurrent().getSystemColor(SWT .COLOR_WIDGET_FOREGROUND)); "
in fact the problem is that the default value is really
COLOR_WIDGET_BACKGROUND but the properties display Color {212, 208, 200}
instead.
that's what confuse me.
is this little probleme will be solved ?
|
|
|
Re: default widget color [message #120784 is a reply to message #120780] |
Tue, 21 March 2006 06:22 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I'm presuming that the Color_widget_background is (212, 208, 200). There
is no way to know this. All that we know is that it is a color of that
value. There is no way to tell the difference between that color and
someone doing a setColor to ColorWidget_background unless it is in the
code of the class being edited since in that case we are processing the
source. But when it is an implicit value set by some other class there
is no way to know how it was set since there is no source to process.
Nor even if there where would we be processing it since we only process
the source of the class being edited.
G Brun wrote:
> using VE1.2.0.v20060227_S
>
> try this :
> place a button in a shell.
> look at it's background & foreground color : it's seem to be hardcoded.
> "Color {212, 208, 200}" but in fact it's not.
>
> set the value to COLOR_WIDGET_BACKGROUND and now you got a generated line:
> " button.setForeground(Display.getCurrent().getSystemColor(SWT .COLOR_WIDGET_FOREGROUND)); "
>
>
> in fact the problem is that the default value is really
> COLOR_WIDGET_BACKGROUND but the properties display Color {212, 208, 200}
> instead.
>
> that's what confuse me.
>
> is this little probleme will be solved ?
>
--
Thanks,
Rich Kulp
|
|
|
Re: default widget color [message #612334 is a reply to message #120780] |
Tue, 21 March 2006 06:22 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I'm presuming that the Color_widget_background is (212, 208, 200). There
is no way to know this. All that we know is that it is a color of that
value. There is no way to tell the difference between that color and
someone doing a setColor to ColorWidget_background unless it is in the
code of the class being edited since in that case we are processing the
source. But when it is an implicit value set by some other class there
is no way to know how it was set since there is no source to process.
Nor even if there where would we be processing it since we only process
the source of the class being edited.
G Brun wrote:
> using VE1.2.0.v20060227_S
>
> try this :
> place a button in a shell.
> look at it's background & foreground color : it's seem to be hardcoded.
> "Color {212, 208, 200}" but in fact it's not.
>
> set the value to COLOR_WIDGET_BACKGROUND and now you got a generated line:
> " button.setForeground(Display.getCurrent().getSystemColor(SWT .COLOR_WIDGET_FOREGROUND)); "
>
>
> in fact the problem is that the default value is really
> COLOR_WIDGET_BACKGROUND but the properties display Color {212, 208, 200}
> instead.
>
> that's what confuse me.
>
> is this little probleme will be solved ?
>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.03404 seconds