Theming for Form widgets [message #97352] |
Wed, 09 July 2008 07:55  |
Eclipse User |
|
|
|
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 08:43   |
Eclipse User |
|
|
|
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 #97427 is a reply to message #97412] |
Wed, 09 July 2008 10:56   |
Eclipse User |
|
|
|
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 12:45  |
Eclipse User |
|
|
|
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.04777 seconds