Jan 8, 2014 Replies: 43 The TabPane container allows the user to switch between different tab pages. Working with TabPane is similar to working with SplitPane. Each page is made of a different layout file. The most important point is to use anchors in the pages layouts. This way the layouts will be resized automatically when the TabPane is resized. For example the following code adds two pages. The second parameter is the tab title. Tab1 and Tab2 are layout files. Code: Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.SetFormStyle("UNIFIED") MainForm.RootPane.LoadLayout("Main") TabPane1.LoadLayout("Tab1", "Tab 1") TabPane1.LoadLayout("Tab2", "Tab 2") MainForm.Show End Sub TabPane.LoadLayout returns a TabPage object. You can use this object to further configure the page. The example is attached. Attachments TabPane.zip TabPane.zip 6.8 KB · Views: 2,524 Last edited: Jan 7, 2016 Click to expand...
The TabPane container allows the user to switch between different tab pages. Working with TabPane is similar to working with SplitPane. Each page is made of a different layout file. The most important point is to use anchors in the pages layouts. This way the layouts will be resized automatically when the TabPane is resized. For example the following code adds two pages. The second parameter is the tab title. Tab1 and Tab2 are layout files. Code: Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.SetFormStyle("UNIFIED") MainForm.RootPane.LoadLayout("Main") TabPane1.LoadLayout("Tab1", "Tab 1") TabPane1.LoadLayout("Tab2", "Tab 2") MainForm.Show End Sub TabPane.LoadLayout returns a TabPage object. You can use this object to further configure the page. The example is attached.
N nadhiras Member Licensed User Longtime User Sep 6, 2016 #41 Erel said: Please start a new thread in the questions forum and post the relevant code. Click to expand... ok thanks erel.. new thread created here : https://www.b4x.com/android/forum/threads/need-help-tabpane-tableview.70734/
Erel said: Please start a new thread in the questions forum and post the relevant code. Click to expand... ok thanks erel.. new thread created here : https://www.b4x.com/android/forum/threads/need-help-tabpane-tableview.70734/
S StarinschiAndrei Active Member Licensed User Longtime User Jan 24, 2017 #42 Hello, Is it possible to add close button in tab? something like in attached image, if yes how can i handle the close tab event. Thank you. Attachments TabWithCloseButton.png 2.2 KB · Views: 911
Hello, Is it possible to add close button in tab? something like in attached image, if yes how can i handle the close tab event. Thank you.
Erel B4X founder Staff member Licensed User Longtime User Jan 24, 2017 #43 Always better to start a new thread for a new question. See this post: https://www.b4x.com/android/forum/t...-or-check-for-existing-tab.74933/#post-476007
Always better to start a new thread for a new question. See this post: https://www.b4x.com/android/forum/t...-or-check-for-existing-tab.74933/#post-476007
S StarinschiAndrei Active Member Licensed User Longtime User Jan 26, 2017 #44 Erel said: Always better to start a new thread for a new question. See this post: https://www.b4x.com/android/forum/t...-or-check-for-existing-tab.74933/#post-476007 Click to expand... Thank you I created a new thread : https://www.b4x.com/android/forum/threads/add-close-tabpane.75626/ Last edited: Jan 26, 2017
Erel said: Always better to start a new thread for a new question. See this post: https://www.b4x.com/android/forum/t...-or-check-for-existing-tab.74933/#post-476007 Click to expand... Thank you I created a new thread : https://www.b4x.com/android/forum/threads/add-close-tabpane.75626/