Hi Dimitri,

On Wednesday 23 September 2009 Dimitri Henning wrote:
> I iam writing a formular assistent and need a forward and backward button.
> Problem is to adresse the previous/next tab.
> I found getChildren
> this gives me:
> qx.ui.tabview.Page[24],qx.ui.tabview.Page[2o],qx.ui.tabview.Page[32],qx.ui.
> tabview.Page[3k],qx.ui.tabview.Page[42]
> 
> But for setSelection i do need the pageobject name.
> Is there any way to use the informations from getChildren with
> setSelection?
First of all you can use the method "setUserData" to add a name to each tab 
page.

--snip--
tabPageInstance.setUserData("name", "tabPageName");
--snip--

Then you can use the method "getSelectables" (which only returns the active 
tabs) to retrieve the tab pages. 
Cycle through them, check for the userdata to get the tab page you want to 
select and set the new selection with 

--snip--
tabView.setSelection( [newTabPage] );
--snip--

As an alternative you can retrieve the current index of your tab page 

--snip--
var currentIndex = tabView.indexOf(tabView.getSelection()[0]);
--snip--

And then cylce through the tab pages and check for "currentIndex + 1" if you 
want to avoid setting userdata at any tab page instance.

cheers,
  Alex

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to