Bug? SplitPane DividerPositions not set

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

when using
B4X:
Private splitMain As SplitPane
splitMain.DividerPositions(0) = 0.8
the divider position is not set to 0.8 but remains at 0.5.

Doing the same via JavaObject, then working fine:
B4X:
setDividerPosition(splitMain, 0, 0.8)

B4X:
' Sets the position of the divider for a splitpane
' Parameter: SplitPane, Index of the Divider, Position range 0 to 1
Sub setDividerPosition(Split As Node, DividerIndex As Int, Position As Double)
  Dim jo As JavaObject = Split
  jo.RunMethod("setDividerPosition", Array As Object(DividerIndex, Position))
End Sub

Any hints how to resolve?
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Got it - Thanks for clarification = misinterpreted the docummentation.

As defined a single splitpane in the main form with two layouts, set the initial divider position by:
B4X:
splitMain.DividerPositions = Array As Double(0.8)
 
Top