• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. SWT Standard Dialogs > The SWT ColorDialog Class

17.5. The SWT ColorDialog Class

The SWT ColorDialog class permits you to enable the user to easily change the color being used by your application to display widgets or text. The dialog provides a graphical mechanism for choosing the desired color, which can then be passed to the setBackground( ) method of a widget.

17.5.1. How do I do that?

You use the ColorDialog in the same manner as the dialogs that have already been discussed. Example 17-4 demonstrates how to use ColorDialog to change the background color of a Text widget.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint