how to catch home and end keys in SWT styledText [message #530523] |
Thu, 29 April 2010 23:03 |
|
Hello,
I have implemented a spell checker on SWT StyledText widget. The basic logic is that the spell checking is done when the modifyText function fires. I calculate the annotations (squiggly lines) I need to draw and then draw them on the widget in the paintListener -> paintContol() method. There is one problem.
Let's say I write some incorrect text in the styledtext widget. The spell checker recognizes the modify event and run a spell check. The paint then draws the errors. Assume that the widget has SWT.SINGLE style. I can keep typing and the spell check keeps drawing the annotations. Now when I hit home to go the start of my text, the annotations are not refreshed as there is no modify event. I want to be able to capture when the "visible text" changes and redraw the annotations. Is there a way to do that?
Thanks for your help.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04252 seconds