Tutorial :what is the order of events that SWT styleText monitors?



Question:

There are a lot of events that styleText can listen to and handle using _listeners of different kinds.

How can I find out which events fired when? For example, key event, line event, paint event, and so forth. Here are the listeners available:

addBidiSegmentListener  addExtendedModifyListener  addLineBackgroundListener  addLineStyleListener  addModifyListener  addPaintObjectListener  addSelectionListener  addVerifyKeyListener  addVerifyListener  addWordMovementListener  

Thanks.


Solution:1

You need the "SWT Custom Controls" from the Eclipse Examples. Follow this page on how to set it up.

Then open the SWT Custom Controls view. Select the tab StyledText. Here you can select all listeners and simply try for yourself. Do something in the editor, and watch the output from the listeners. Very useful tools.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »