Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Theming for Form widgets
Theming for Form widgets [message #97352] Wed, 09 July 2008 07:55 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 09:52 Go to previous messageGo to next message
Eclipse UserFriend
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 10:35 Go to previous messageGo to next message
Eclipse UserFriend
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 10:56 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Display#getSyncThread wanted
Next Topic:is there a default theme.css somewhere?
Goto Forum:
  


Current Time: Mon May 05 14:33:20 EDT 2025

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

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

Back to the top