viewstack vs. tab navigator - apache-flex

I'm new to flex and was looking at some of the components that ship with flex.
Can someone tell me the difference between viewstack and tab navigator. They seem to be somewhat similar.
When do you use one or the other?

Both are navigator containers.
The difference is tabnavigator displays tabs (one for each of its child) in order to control which child should be displayed.
Viewstack doesn't have a UI which means you change the selected child with actionscript code.
Also, you can use a tabnavigator, a togglebuttonbar or other UI navigators as controllers for your viewstack by setting the navigator dataProvider property to the id of your viewstack.

both are same , but
in viewStack at a time any only one item can be selected in run time,while all are in a quee(not seems),
where as with tabNavigator all items are visible ,depending upon requirement we can select any one tab at a instance
Note : to show all options visible tab navigator is usefull,
to show only one among all items go for tab navigator

TabNavigator extends ViewStack and supplys some default UI to navigate to children of the TabNavigator.
Use TabNavigator when all you need is standard navigation (like main menu's on web sites).
Use ViewStack when you need custom navigation, like vertical lists, or when you dont need navigation (you might have a view stack with a login box and switch the view on login event)

Related

How to add child my view on top-level window? (Xamarin.forms)

I'm making app with using Xamarin.forms.
I'm creating my own tabbar.
But for that, I have to attach this tabs on most high depth windows.
for example, If new navigation page is pushed on iOS, it must be on that.
How to access most top depth's layout? (I want to add child my tabs on that)
1) Make your tabbar a ContentView
2) On each of your page add the tabbar as the last child of your Content (being an AbsoluteLayout for example)

Accessing TabNavigator from child mxml :-Adobe AIR

This is my AIR application's UI structure::
Tab Navigater(Main UI)
-->child1.mxml
(toggle button bar)
|--element1.mxml
|--element2.mxml
|--element3.mxml
-->child2.mxml
(toggle button bar)
|--element1.mxml
|--element2.mxml
|--element3.mxml
-->child3.mxml
(toggle button bar)
|--element1.mxml
|--element2.mxml
|--element3.mxml
I want to access the parent element and change that index from child element and child of child element..Can you help me? or advice me.
Example:
I want to change the tab from the elemet2.mxml in child3.mxml
For encapsulation purposes you should never access a parent. The proper approach is to dispatch an event from the child and listen to it the parent. In your event listener method you can perform the parent functionality you desire.
You can not access directly.You can access through some frameworks or eventlistener.

Toggle viewstack within child component

I have a viewstack with two tabs.
In one of them there is a data grid shows a list of notes. The other one is includes a form that can edit notes or crates new note. I want the user to be able to add new note or edit existing note when clicks an item in data grid. I mean when user clicks an item the viewstack must become editor.
You can use the "selectedIndex" or "selectedItem" property on the viewstack to switch the active view. In your case, an event should be dispatched that bubbles up to the component containing the viewstack. When it arrives, the viewstack's active view can then be changed.

Implementing Tabs and Data grid together in Flex

I have a problem in my project.I want to implement Tab bar function under a drop down selection and when once tab bar is clicked it has to be navigated to a data grid.Can any body suggest me the proper direction to implement it.
Thanks,
Brenda
Use a tab navigator, add canvases as children to that navigator, put your datagrid on one of those children.

Flex: Cannot tab between controls on a modal popup

Steps to reproduce:
Create a modal popup to popup with popupmanager (mine is a group with a skinnable container inside of it)
Put field components (textinputs) on the modal popup
Attempt to tab between controls
Tab switches to controls behind the modal-popup and ignores the fact that the modal is there. The tab loop only contains controls behind the modal.
I've tried everything from setting tabChildren, to hasFocusableChildren. I can't implement IFocusManager as it's Halo and my modal is a Spark group, but would that work in some capacity? It really seems like Flex just ignores the modal in its focusmanager.
This is not a bug, I'm assuming it's by design.
Group is supposed to be a lightweight container -- just for grouping things together. Group does not implement the IFocusManagerContainer interface.
SkinnableContainer (or more correctly SkinnableContainerBase) implements that interface, and that's why tabbing works when you use it w/PopupManager.
Solution can be found here (if you want to use a Group):
http://googolflex.com/?p=650
Can you try using TitleWindow instead of group with a skinnable container? We use TitleWindow all the time and it does tab correctly.

Resources