On Wed, Oct 10, 2012 at 2:59 PM, Staffan Tylen <staffan.ty...@gmail.com> wrote: > >> That's only partially true. You can make full use of this in a >> TreeView without having user data available. It just, in some cases, >> would make it easier. You are sent the handle to the tree-view item >> that the tip is for, and that is sufficient. >> > > Not sure that I understand this correctly. In my case the tip would display > information that would be stored as itemData and would be unique for each > item.
Here is a complete program that tracks information unique to each item. The info tip stuff needs 4.2.1 to work of course, but it should be enough to get the idea. I'll attach a .png of the dialog in action. Attachments are probably stripped out though. /* Simple tree-view example */ .application~useGlobalConstDir('O') .constDir[IDC_TREE] = 100 dlg = .TreeViewDialog~new dlg~execute("SHOWTOP", IDI_DLG_OOREXX) ::requires "ooDialog.cls" ::class 'TreeViewDialog' subclass UserDialog ::method init expose treeData forward class (super) continue self~create(30, 30, 175, 223, "Tree View Dialog", "CENTER") treeData = .table~new ::method defineDialog self~createTreeView(IDC_TREE, 7, 7, 160, 187, 'ATROOT BUTTONS LINES INFOTIP') self~createPushButton(IDOK, 63, 202, 50, 14, "DEFAULT", "Ok") self~createPushButton(IDCANCEL, 118, 202, 50, 14, , "Cancel") self~connectTreeViewEvent(IDC_TREE, 'GETINFOTIP') ::method initDialog expose tv treeData tv = self~newTreeView(IDC_TREE) hItem = tv~add("Peter", , ,"BOLD EXPANDED") treeData[hItem] = 'Data unique to Peter' hItem = tv~add(,"Mike", , ,"EXPANDED") treeData[hItem] = 'Mike talks a lot.' hItem = tv~add(, ,"George") treeData[hItem] = 'George was famous once.'.endOfLine'He is unknown to my'.endOfLine'niece.' hItem = tv~add(, ,"Monique") treeData[hItem] = 'Monique has never been to France' hItem = tv~add(, , ,"John") treeData[hItem] = 'John owns 4 dogs' hItem = tv~add(, ,"Chris") treeData[hItem] = 'Chris will never be president' hItem = tv~add(,"Maud") treeData[hItem] = 'Maud likes to bake.' hItem = tv~add(,"Ringo") treeData[hItem] = 'Data unique to Peter' hItem = tv~add("Paul", , ,"BOLD EXPANDED") treeData[hItem] = "Two roads lead to Paul's house." hItem = tv~add(,"Dave") treeData[hItem] = 'No one lives with Dave.' hItem = tv~add(,"Sam") treeData[hItem] = 'Sam loves pizza' hItem = tv~add(,"Jeff") treeData[hItem] = 'Jeff rides his bike to work.' hItem = tv~add("Mary", , ,"BOLD EXPANDED") treeData[hItem] = 'Mary owes $49.50 to her dentist.' hItem = tv~add(,"Helen") treeData[hItem] = 'A closer look at Helen is warranted.' hItem = tv~add(,"Michelle") treeData[hItem] = 'The Toyota Camray belongs to Michelle.' hItem = tv~add(,"Diana") treeData[hItem] = 'Go go Chargers.' ::method onGetInfoTip unguarded expose tv treeData use arg id, hItem, text, maxLen return treeData[hItem] Now, in the above, the user data item is also passed to onGetInfoTip(). But the program works fine and does not use the user data at all. -- Mark Miesfeld
<<attachment: quickTree.png>>
------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users