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

Chapter 7. Tools for Use with Text and T... > Using the ContextMenu Class

Using the ContextMenu Class

The ContextMenu class is not inherently associated with the PrintJob class or any of the text field classes, but it is introduced here because using it with PrintJob is one of the effective ways to employ it. The nice thing about the context menu is that you can add a control without having to add a button or other controller to the Stage. Instances of the TextField class are the ideal place for adding context menus because they represent one of the ways you can use the text area as a launching site for actions relating to a text field. Printing is one such action the designer or developer may want to add to a text field.

Basic Format

Here is the basic format for working with the ContextMenu class and TextField classes:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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