CodeQrius
CodeQrius

Reputation: 429

Flex tab's x and y position

In a tab navigator, I need to find out the x and y coordinates of each the tabs. Is there a way to do that? I am using HBox as Tab in the TabNavigator.

Upvotes: 0

Views: 562

Answers (1)

Amarghosh
Amarghosh

Reputation: 59471

If you want the positions of the tab buttons:

var button:Button = tabNavigator.getTabAt(i);

would return the tab at ith position. Read its x and y.

trace(button.x);
trace(button.y);

If you want the positions of tab contents, then use tabNavigator.getChildAt(i) to get the container at i and read its x and y.

Upvotes: 1

Related Questions