Re: making tree with custom tree view dynamicaly (c++)
reverendlinux <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <[email protected]> |
On Nov 25, 3:42 am, Neil <[email protected]> wrote: > YuLo wrote: > >i'd like to make a new tab in tabbox with tree widget dynamicaly. > > >I think i can insert nessesary xul tags in the DOM document. > >But where can i get TreeBoxObject for this tree to assign my custom tree view object(XPCOM c++) to its view property. > > In JavaScript, simply write treeElement.view = theView; > In C++, you need to QI your tree element to nsIDOMXULElement, then call > GetBoxObject, then QI that to nsITreeBoxObject, then call SetView. > > -- > Warning: May contain traces of nuts. Neil, I've been working on something similar and gave up because I couldn't get the trees to show in the tabboxes when the trees were created dynamically. My original post here in the forums is linked below. I'm using the approach you mentioned above but no luck. I'm posting this because in hopes the original poster doesn't run into the same issue. - John Trees in Tabs? - http://groups.google.com/group/mozilla.dev.tech.xul/browse_thread/thread/f19090527449e30b/53f3e4b919718d75?lnk=gst&q=tab#53f3e4b919718d75