File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing the StyledText value - SWT

 
Carl John
Ranch Hand
Posts: 47
Eclipse IDE Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm newbie in SWT . I'm trying to print the StyledText value into an image format. I don't know how to deal with StyledText. My code snippet is


final StyledText styledText = new StyledText(shell, SWT.V_SCROLL | SWT.BORDER);

styledText.setText("HELLO WORLD");

styledText.setStyleRange(new StyleRange(0, 5, display.getSystemColor(SWT.COLOR_GREEN), null));

styledText.setStyleRange(new StyleRange(7, 11, display.getSystemColor(SWT.COLOR_RED), null));

...
.....


Anyone please guide me...!

Very Thanks in advance..!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic