10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Treeview Fields3. Select a field in the tree. For example, stk1(stackfield).The background of the corresponding stack field in the first frame changesto a different color:The next time you select the item in the tree, the background of thecorresponding field reverts to its original color. You can continue to selectitems in the tree, or click the standard close button (X) to exit the example.In this example the tree is based on the hierarchical relationship of the fields inthe frame sample_frame. The tree_example_2 is called with a FrameExec as aparameter. The tree is built with the recursive procedure, add_a_node. Given afield, add_a_node adds a node corresponding to the given field, and then callsitself to add nodes for any of the field's children.How You Can Attach Information to a Tree NodeEvery class has an attribute, ClientData, of type Object. The ClientDataattribute provides a convenient way to attach data to a tree node. Intree_example_2, the add_a_node method attaches a tree_ex2_class object toeach tree node.Working with List Views and Tree Views 273

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!