I'd like to add this Sub to the DesignerUtils.b4xlib:
The problem is, I need to be able to get the maximum width of the control to contain all the text. Does v.Width cover that in the above Sub, or will that only acquire the Width that has been set in the Designer/code for that view?
New DesignerUtils.b4xlib Sub:
'Justifies the controls evenly to the left
'Parameters: Panel, Starting indent, Minimum gap between controls
Public Sub PackControlsLeft (DesignerArgs As DesignerArgs)
Dim Panel As B4XView = DesignerArgs.GetViewFromArgs(0)
If Panel.IsInitialized = False Then Return
Dim startX as Int = DesignerArgs.Arguments.Get(1)
Dim Gap As Int = DesignerArgs.Arguments.Get(2)
For i = 0 To Panel.NumberOfViews - 1
Dim v As B4XView = Panel.GetView(i)
v.SetLayoutAnimated(0, startX, v.Top, v.Width, v.Height)
startX = startX + v.Width + Gap
Next
End Sub
The problem is, I need to be able to get the maximum width of the control to contain all the text. Does v.Width cover that in the above Sub, or will that only acquire the Width that has been set in the Designer/code for that view?