How to determine StyledText content with expanded tabs [message #448132] |
Tue, 18 April 2006 19:47 |
Eclipse User |
|
|
|
Originally posted by: Alexander.Kriegisch.web.de
(Attention: I also posted this message to the corresponding SWT newsgroup.
I am sorry for any inconvenience this might cause.)
I have a reference to the StyledText widget of the currently displayed
Java (or whatever the document type) editor. I can also determine any
desired StyledRanges, fonts, colours, tab width etc. - so far, so good.
What I could not determine so far is how each tab character is expanded in
the editor to be displayed as a series of whitespace characters. It is not
as easy as replacing each tab by 2/4/8 etc. spaces, because tabs and
spaces can be mixed and tabs can occur in the middle of any text line, not
only at the beginning. I want to convert each sequence of linear
whitespace to the corresponding sequence of plain space characters, so as
to get a perfectly mirrored text layout from the widget's current content.
I would be grateful for any hints. Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.03158 seconds