Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to set the color of text in state line (how to set the color of text in state line )
how to set the color of text in state line [message #696001] Wed, 13 July 2011 04:00 Go to next message
Yiqiao  is currently offline Yiqiao Friend
Messages: 6
Registered: June 2011
Junior Member
Can any one help me to resolve this question?

I want to change text style in state line for my rcp application.

I did it in ApplicationActionBarAdvisor.fillstatusLine method,
there is a parameter "IStatusLineManager", I use IStatusLineManager.setMessage("") method to set text. but I can't set stytle for text, how to do it ?


Thansk a lot~
(no subject) [message #696036 is a reply to message #696001] Wed, 13 July 2011 06:34 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
Registered: July 2009
Senior Member
Hi Yiqiao,

You have to contribute your own (StyledText) control to the status line.

Regards,

Wim


> Can any one help me to resolve this question?
>
> I want to change text style in state line for my rcp application.
>
> I did it in ApplicationActionBarAdvisor.fillstatusLine method,
> there is a parameter "IStatusLineManager", I use
IStatusLineManager.setMessage("") method to set text. but I can't set stytle
for text, how to do it ?
>
>
> Thansk a lot~
Re: (no subject) [message #696083 is a reply to message #696036] Wed, 13 July 2011 08:32 Go to previous messageGo to next message
Yiqiao  is currently offline Yiqiao Friend
Messages: 6
Registered: June 2011
Junior Member
Hi Wim,

Do you mean I have add an action or StatusLineContributionItem to status line?

Smile
Re: (no subject) [message #696485 is a reply to message #696036] Thu, 14 July 2011 05:28 Go to previous message
Yiqiao  is currently offline Yiqiao Friend
Messages: 6
Registered: June 2011
Junior Member
I tried an other way:

Create a class "MyStatusItem" extends ContributionItem, copy all code from "StatusLineContributionItem" to "MyStatuesItem"(package must be same as "StatusLineContributionItem"), add style for label in "fill(Composite composite)" method.

then add this item to status line;

but the text in status line is align center, how to make it align left?

Shocked
Thanks.
Previous Topic:View persistency in workbench
Next Topic:Saving workbench layout on program exit
Goto Forum:
  


Current Time: Thu Apr 25 19:05:09 GMT 2024

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

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

Back to the top