Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » MenuBar backgroud
MenuBar backgroud [message #76564] Tue, 04 March 2008 22:29 Go to next message
Eclipse UserFriend
Originally posted by: dnise.hotmail.com

HI All:
can I implement to set background Color for MenuBar or StatusBar in RAP?
could anyone give me some ideas?

Thanks

allen
Re: MenuBar backgroud [message #76612 is a reply to message #76564] Wed, 05 March 2008 04:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi,

dnise wrote:
> HI All:
> can I implement to set background Color for MenuBar or StatusBar in RAP?
> could anyone give me some ideas?

There is no Menu#setBackground method in RAP because this method does not
exist in SWT either and RAP implements a strict subset of SWT. I guess the
reason that this method does not exist in SWT is that on the desktop, the
menu colors are under operating system / window manager control.

That's were the RAP theming comes in: You can register a property file like
the following with the extension point org.eclipse.rap.ui.themes to set
the menu colors for your application:

menu.foreground: black
menu.hover.foreground: white
menu.background: #ffff23
menu.hover.background: #0000ff

For more information on RAP Theming, refer to the RAP Help, also available
at
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. rap.help/help/html/advanced/theming.html

Best,
Ralf
Re: MenuBar backgroud [message #76821 is a reply to message #76612] Wed, 05 March 2008 22:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dnise.hotmail.com

Ralf Sternberg wrote:

> Hi,
>
> dnise wrote:
>> HI All:
>> can I implement to set background Color for MenuBar or StatusBar in RAP?
>> could anyone give me some ideas?
>
> There is no Menu#setBackground method in RAP because this method does not
> exist in SWT either and RAP implements a strict subset of SWT. I guess the
> reason that this method does not exist in SWT is that on the desktop, the
> menu colors are under operating system / window manager control.
>
> That's were the RAP theming comes in: You can register a property file
> like
> the following with the extension point org.eclipse.rap.ui.themes to set
> the menu colors for your application:
>
> menu.foreground: black
> menu.hover.foreground: white
> menu.background: #ffff23
> menu.hover.background: #0000ff
>
> For more information on RAP Theming, refer to the RAP Help, also available
> at
>
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. rap.help/help/html/advanced/theming.html
>
> Best,
> Ralf

Hi:
Thanks for you ideas.I can change the back-ground color for menu using theme
properties file.But Theme properties file is used for the whole
application(as for the whole system's button, text ect.),we can't change
the color displayed for menu after the application started, so it's not
flexibility. I can change the Coolbar's back-ground color using code.
why menu not? does anyone give me some advice?

thanks & regards
Re: MenuBar backgroud [message #76868 is a reply to message #76821] Thu, 06 March 2008 02:04 Go to previous message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

the answer was already given by Ralf:

> There is no Menu#setBackground method in RAP because this method does
> not exist in SWT either and RAP implements a strict subset of SWT. I
> guess the reason that this method does not exist in SWT is that on the

> desktop, the menu colors are under operating system / window manager
control.

And as menus belong to the trimming part of a shell, I guess Ralf is
right about that.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: dnise [mailto:dnise@hotmail.com]
Bereitgestellt: Donnerstag, 6. März 2008 04:46
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: MenuBar backgroud
Betreff: Re: MenuBar backgroud


Ralf Sternberg wrote:

> Hi,
>
> dnise wrote:
>> HI All:
>> can I implement to set background Color for MenuBar or StatusBar in
RAP?
>> could anyone give me some ideas?
>
> There is no Menu#setBackground method in RAP because this method does
> not exist in SWT either and RAP implements a strict subset of SWT. I
> guess the reason that this method does not exist in SWT is that on the

> desktop, the menu colors are under operating system / window manager
control.
>
> That's were the RAP theming comes in: You can register a property file

> like the following with the extension point org.eclipse.rap.ui.themes

> to set the menu colors for your application:
>
> menu.foreground: black
> menu.hover.foreground: white
> menu.background: #ffff23
> menu.hover.background: #0000ff
>
> For more information on RAP Theming, refer to the RAP Help, also
> available at
>
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. rap.help/hel
p/html/advanced/theming.html
>
> Best,
> Ralf

Hi:
Thanks for you ideas.I can change the back-ground color for menu using
theme properties file.But Theme properties file is used for the whole
application(as for the whole system's button, text ect.),we can't change
the color displayed for menu after the application started, so it's
not flexibility. I can change the Coolbar's back-ground color using
code.
why menu not? does anyone give me some advice?

thanks & regards
Previous Topic:java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Display.sleep()Z
Next Topic:Background Color in TreeViewer
Goto Forum:
  


Current Time: Sat May 10 16:47:15 EDT 2025

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

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

Back to the top