B4J Question SplitPane: How to set a width on a particular pane

Mashiane

Expert
Licensed User
Longtime User
Hi

I have a split pane with 3 panes. I have set the min and max sizes

B4X:
SDSplit.SetSizeLimits(0, 10, 400)
    SDSplit.SetSizeLimits(2, 10, 400)

This is fine, when the page loads, the 3rd pane is not 400 (as that is just a max width), I want it to fill the space and be 400.

How can I set the pane width e.g. SetSize(2, 400)

Thanks.
 

aeric

Expert
Licensed User
Longtime User
I also struggle with the Min and Max size when I develop the Postman Alternative project. I prefer to set the DividerPositions.

B4X:
Private Sub B4XPage_Appear
    SplitPane2.DividerPositions = Array As Double(0.75)
End Sub
 
Upvote 0

PaulMeuris

Well-Known Member
Licensed User
Or you could use both settings:
B4X:
    SplitPane1.LoadLayout("leftpane_layout")
    SplitPane1.LoadLayout("middlepane_layout")
    SplitPane1.LoadLayout("rightpane_layout")
    SplitPane1.SetSizeLimits(0,100,150)
    SplitPane1.SetSizeLimits(1,150,300)
    SplitPane1.SetSizeLimits(2,100,200)
    SplitPane1.DividerPositions = Array As Double(0.150,0.450,0.750)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…