Theming for Form widgets [message #97352] |
Wed, 09 July 2008 11:55 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Hi,
Is it possible change the default appearance of Forms specific widgets
like Section, Expandables or widgets created via FormToolkit, using
theming mechanism for instance ?
Regards,
Setya
|
|
|
Re: Theming for Form widgets [message #97385 is a reply to message #97352] |
Wed, 09 July 2008 12:43 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: rsternberg.innoopract.com
Hi Setya,
Setya wrote:
> Is it possible change the default appearance of Forms specific widgets
> like Section, Expandables or widgets created via FormToolkit, using
> theming mechanism for instance ?
Im sorry to say, the widgets provided by Forms are not yet themeable. It
is also not possible to distinguish widgets created by the FormToolkit
from those that are not. If you need to style those widgets in a
different way, you'll have to set a widget variant on them after creation.
In the future, there might be easier ways to handle this, e.g. using
descendent selectors in CSS, but that's still far out.
Regards,
Ralf
|
|
|
Re: Theming for Form widgets [message #97399 is a reply to message #97385] |
Wed, 09 July 2008 13:52 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Ralf,
> Im sorry to say, the widgets provided by Forms are not yet themeable. It
> is also not possible to distinguish widgets created by the FormToolkit
> from those that are not. If you need to style those widgets in a
> different way, you'll have to set a widget variant on them after creation.
I'm curious about what you mean by styling in different way and setting
widget variant, could you elaborate more ?
Regards,
Setya
|
|
|
Re: Theming for Form widgets [message #97412 is a reply to message #97399] |
Wed, 09 July 2008 14:35 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: rsternberg.innoopract.com
Setya wrote:
> I'm curious about what you mean by styling in different way and setting
> widget variant, could you elaborate more ?
If you set a custom widget variant to widgets created using FormToolkit,
Button button = FormToolkit.createButton( parent, text, SWT.PUSH );
button.setData( WidgetUtil.CUSTOM_VARIANT, "forms" );
this allows you to style those widgets separately using CSS like
Button.forms {
color: blue;
}
I thought this is what you were looking for, or did I got you wrong?
Ralf
|
|
|
Re: Theming for Form widgets [message #97427 is a reply to message #97412] |
Wed, 09 July 2008 14:56 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Ralf,
> If you set a custom widget variant to widgets created using FormToolkit,
> Button button = FormToolkit.createButton( parent, text, SWT.PUSH );
> button.setData( WidgetUtil.CUSTOM_VARIANT, "forms" );
> this allows you to style those widgets separately using CSS like
> Button.forms {
> color: blue;
> }
> I thought this is what you were looking for, or did I got you wrong?
Thanks. I'll experiment with this to see if it fits my needs.
More question, what if I need to change appearance of workbench parts like
views, editor tabs etc ? Is it possible at all ?
Regards,
Setya
|
|
|
Re: Theming for Form widgets [message #97615 is a reply to message #97427] |
Thu, 10 July 2008 16:45 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: rherrmann.innoopract.com
Setya wrote:
> Ralf,
>
>> If you set a custom widget variant to widgets created using FormToolkit,
>
>> Button button = FormToolkit.createButton( parent, text, SWT.PUSH );
>> button.setData( WidgetUtil.CUSTOM_VARIANT, "forms" );
>
>> this allows you to style those widgets separately using CSS like
>
>> Button.forms {
>> color: blue;
>> }
>
>> I thought this is what you were looking for, or did I got you wrong?
>
> Thanks. I'll experiment with this to see if it fits my needs.
>
> More question, what if I need to change appearance of workbench parts
> like views, editor tabs etc ? Is it possible at all ?
Styling the workbench with CSS isn't possible, neither in RAP nor in
RCP.
You would need to write your own 'Presentation'.
>
> Regards,
>
> Setya
|
|
|
Powered by
FUDForum. Page generated in 0.03169 seconds