Re: making tree with custom tree view dynamicaly (c++)
reverendlinux <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xpfe |
|---|---|
| Message-ID | <7e67de00-4c43-44f8-8b07-0b97b237a161@jj5g2000pbc.googlegroups.com> |
On Nov 25, 11:18 am, YuLo <[email protected]> wrote: > воскресенье, 25 ноября 2012 г., 20:23:05 UTC+4 пользователь reverendlinux написал: > > > > > > > > > > > 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/thr... > > reverendlinux, > Neil wrote it should work. > I think you made a mistake. > At first glance you wrote many times > <treechildren id="child"> !! > id should be unique. > BTW, i meant "dynamicaly" to create new tab programmaticaly. Yulo, Thanks for pointing that out. But even with that correction I still can't get the tree in the tab populated dynamically via a function. Take away the tab, and the function works. So this one still has me beat. Thanks again, - reverendlinux _______________________________________________ dev-tech-xul mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xul