Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] column number with caret in Styled Text

Hi !

Still me, again !

I'm now working on a little thing that looks like Notepad in Windows.
I use a Styled Text widget. I want to show the line and column number
when moving the cursor in the text. I can get the line number with the
caret objet by getting the y location and dividing it by the
lineHeight. This solution works with any kind of police and height.

But i'm not able to get the column number correctly. It depends on the
police. Maybe i just don't find a getter that give me this information
!!!

Plase help me !

Thank you very much

Benoit Sauvé,
Computer Engineering Student
Sherbrooke University, Québec, Canada


Back to the top