views:

9

answers:

1

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.

A: 

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.

the.duckman