Java SWT StyledText event to detect when the Control autoscrolls to show cursor position -


for rcp text editor styledtext used.

the styledtext background-image , text need scrolled @ once.

how can detected event of autocroll? if exists.

for example: if user press end_key , line in caret located is longer size of styledtext control area, control autoscrolls show caret position. same happeds if user press lef_arrow , cursor @ beggining of line , previous line has lenth greater control size.

so when autoscroll detected, listener can redrawn background accordingly.

up date solution found write listeners each event produced autoscroll. i.e. write events for:

st.addcaretlistener(new caretlistener (){...}; st.addlistener(swt.modify, new listener() {...}; ... st.addkeylistener(){...}; st.addmouselistener(){...};

so inside of each event write code paint background image. whith listener notified when controls scrolls itself, code shall more efficient.

thanks in advance


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -