scrollswtscrollbarstyledtext

How to scroll automatically StyledText (SWT)


I have a StyledText widget with both scrollbars. The text inside is bigger than the client area (both scrollbars are active). I iterate through every char from the text.

How to scroll automatically in order to show every char visible (char selected by iterator)?


Solution

  • Call the showSelection method of StyledText to make sure the current selection is visible.