B4J Question TabPane LoadLayout Strange Behaviour

rwblinn

Well-Known Member
Licensed User
Longtime User
(B4J 5.90 Beta 1)
Whilst developing a more complex B4J application, experienced weird behaviour when loading multiple layouts to a tabpane.

Extracted from the project, the relevant code - sample project attached:
The mainform has a tabpane in which 3 pages are loaded. The result is a view mix of the Search & Tags page. When the load order is changed, other pages are mixed. Also the tabs are not displayed beside each other.

Is this a bug or is the loadlayout code wrong?

B4X:
Sub Process_Globals
    Private TabPane_Tools As TabPane
...
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("PaneTools") 
    TabPane_Tools.LoadLayout("PaneToolsPreview", "Preview")
    TabPane_Tools.LoadLayout("PaneToolsSearch", "Search")
    TabPane_Tools.LoadLayout("PaneToolsHTMLTags", "Tags")   
    MainForm.Show
End Sub


upload_2017-8-29_16-25-5.png
 

Attachments

  • TabPaneLoad.zip
    6 KB · Views: 295

stevel05

Expert
Licensed User
Longtime User
You have a second Tabpane with the same name (TabPane_Tools) defined in the layout PaneToolsSearch (as well as the layout PaneTools). Once that is loaded, subsequent layouts are loaded to that.
 
Upvote 0
Top