StyledText Does Not Show Control Characters [message #525993] |
Thu, 08 April 2010 09:44  |
Eclipse User |
|
|
|
Hi,
I have a problem using StyledText for displaying Text from a file.
While every normal editor is representing control characters inside the file with a place holder, the widget StyledText is missing them or not displaying them.
Is it possible, that StyledText can also display this control characters using a place holder? If I copy the content from StyledText to an Editor like Notepad, the control characters are shown.
Any hint is welcome.
Bjoern
|
|
|
|
|
Re: StyledText Does Not Show Unit Separator [message #639410 is a reply to message #526824] |
Tue, 16 November 2010 08:09  |
Eclipse User |
|
|
|
I still have the problem with displaying the Unit Separator (<US>, ASCII 31) in a StyledText.
I added something like
...
setFontStyle("courier", 10, "Courier New", SWT.NORMAL);
...
// transcript is the StyledText
public void setFontStyle(String description, int point, String font, int style) {
if (transcript == null || display == null) return;
if (fontRegistry == null)
fontRegistry = new FontRegistry(display);
fontRegistry.put(description, new FontData[] {new FontData(font, point, style)});
transcript.setFont(fontRegistry.get(description));
transcript.update();
}
to my editor component. But StyledText does not display a Unit separator while it displays any other special ASCII character with an empty caret.
Has anyone encountered a similar problem and a fix for it?
[Updated on: Tue, 16 November 2010 08:22] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.27406 seconds