Re: Activating tab

YuLo <[email protected]> Thu, 12 Dec 2013 09:35:20 -0800 (PST)
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
On Thursday, December 12, 2013 7:51:06 PM UTC+4, YuLo wrote:
> On Thursday, December 12, 2013 1:01:10 AM UTC+4, Neil wrote:
> 
> > YuLo wrote:
> 
> > 
> 
> > 
> 
> > 
> 
> > >I wondering how can I activate tab in c++ XPCOM of my xulrunner application.
> 
> > 
> 
> > >I can add tab using DOM interface.
> 
> > 
> 
> > >As far as I see DOM interface have no means to activate tab.
> 
> > 
> 
> > >Is there any other way?
> 
> > 
> 
> > >  
> 
> > 
> 
> > >
> 
> > 
> 
> > The <xul:tabs> element implements the nsIDOMXULSelectControlElement 
> 
> > 
> 
> > interface which you can use to alter the selected tab.
> 
> > 
> 
> > 
> 
> > 
> 
> > -- 
> 
> > 
> 
> > Warning: May contain traces of nuts.
> 
> 
> 
> Thank you, Nail again, and very much!
> 
> It works!

After I can successfully add tab I want to remove it.

nsCOMPtr<nsIDOMXULSelectControlElement> tabs1(do_QueryInterface(tabs));
tabs1->GetSelectedIndex(&i);
tabs1->RemoveItemAt(i, &tab2);

I wonder what is the second parameter for in "RemoveItemAt"
Should I remove the tab in DOM by myself?
I have a tree in tab, should I delete tree object by myself?