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

Chapter 13. SWT Trees > Adding Items to the Tree

13.2. Adding Items to the Tree

Items within the tree are represented by instances of the TreeItem class. You must create one TreeItem object for each item you wish to add to the tree.

13.2.1. How do I do that?

To attach an item directly to the trunk of the tree, you pass the TreeItem constructor the reference to the Tree object you have created, along with a style and the position in which you want the item to appear:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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