Created
March 18, 2011 19:15
-
-
Save jonalter/876662 to your computer and use it in GitHub Desktop.
TabGroup in a TabGroup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tabGroupOuter = Ti.UI.createTabGroup(); | |
| tabGroupOuter.addTab(Ti.UI.createTab({ | |
| title: 'app.js', | |
| window: Ti.UI.createWindow({ | |
| title: 'app.js', | |
| url: 'middle.js', | |
| backgroundColor: 'red' | |
| }) | |
| })); | |
| tabGroupOuter.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var containingWindow = Ti.UI.currentWindow; | |
| var tabGroupInner = Ti.UI.createTabGroup(); | |
| tabGroupInner.addTab(Ti.UI.createTab({ | |
| window: Ti.UI.createWindow({ | |
| backgroundColor: 'blue' | |
| }) | |
| })); | |
| tabGroupInner.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var currentTab = Ti.UI.currentTab; | |
| var button = Ti.UI.createButton({ title: 'open inner tab group' }); | |
| button.addEventListener('click', function() { | |
| var win = Ti.UI.createWindow({ | |
| url: 'inner.js', | |
| title: 'inner.js' | |
| }); | |
| currentTab.open(win); | |
| }); | |
| Ti.UI.currentWindow.add(button); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment