Hello,
I played with some panels (pane) and created a layout with a left and right pane.
The right pane can be made smaller by editing PrefWidth. The left pane will scale to fit the space.
But the inner content of that pane is not be repositioned, unless all views are anchored.
For me, it is difficult to explain. Please try the attached example.
What do I have to do in order to refresh the positions?
And why it restores to original size after resize?
I played with some panels (pane) and created a layout with a left and right pane.
The right pane can be made smaller by editing PrefWidth. The left pane will scale to fit the space.
But the inner content of that pane is not be repositioned, unless all views are anchored.
For me, it is difficult to explain. Please try the attached example.
What do I have to do in order to refresh the positions?
And why it restores to original size after resize?
pane resize:
#REGION ToggleMenu
Private Sub btnToggleRightPane_Click
'width 190 / 50
If PanMenu.Prefwidth <> 50 Then
PanMenuClose
Else
PanMenuOpen
End If
End Sub
Sub PanMenuOpen()
PanMenuSize(190,4,2)
btnToggleRightPane.Text = Chr(0xF061)
End Sub
Sub PanMenuClose()
PanMenuSize(50,4,2)
btnToggleRightPane.text = Chr(0xF060)
End Sub
Sub PanMenuSize(intSize As Int,intGap As Int, intMarge)
PanMenu.prefWidth = intSize
PanLayouts.Left = intMarge
PanLayouts.PrefWidth = B4XPages.GetNativeParent(Me).Width - (intMarge + intGap + intSize + intMarge)
PanMenu.left = PanLayouts.Left + PanLayouts.PrefWidth + intGap
End Sub
#End Region