Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » StyledRanges
StyledRanges [message #460891] Mon, 01 January 2007 12:49
Eclipse UserFriend
Originally posted by: florianwendland.freenet.de

Hello all,
it's me again.

I have tried to follow the article about the StyledText-Widget,
especially the section concerning StyleRanges. In my app, the text
changes will be catched by a VerifiyKeyListener, send to my business
locic and than inserted by calling replaceTextRange()-method from the
StyledText.

Now, I just tried to add a test StyleRange, like this:

theEditor.replaceTextRange(offsetOfTextToBeAdd, 0, this.getContent());
final StyleRange str = new StyleRange(0,5,
new Color(PlatformUI.getWorkbench().getDisplay(), 123,7,43),
new Color(PlatformUI.getWorkbench().getDisplay(), 0,0,255));
theEditor.setStyleRange(str);


The replaceTextRange-Method works fine, but the StyleRange doesn't.
IMHO, the first 6 characters should be decorated with my style, but the
are not. I do not know, what I am doing wrong.

Hope, that someone can give me a hint.
Thx

Florian
Previous Topic:Suppressing menus, menu entries and toolbuttons
Next Topic:RCP for server side, please comment
Goto Forum:
  


Current Time: Fri Mar 21 20:33:44 EDT 2025

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

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

Back to the top