[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: StyledText maximum visible text area

StyledText.getClientArea() should be what you want.

Grant


"Jacek Pospychala" <jacekp@xxxxxxx> wrote in message
news:ekgne0$q2q$1@xxxxxxxxxxxxxxxxxxxx
> Hello!
>
> how do I calculate the width of the area in StyledText where the text is
>   painted?
>
> Currently i have something like this:
>
> width = styledText.getBounds().width -
> styledText.getVerticalBar().getSize().x;
>
> However it is still too large (by about 8-9 pixels under gtk+).
> (i do check if vertical bar is not null)
>
> I simply want to draw a rectangle around the text.
>
> Thanks for help!
>
> Jacek