Guys
I am using the following code to set the sizes/positions of two types of panels that contain a header and a body label:
I suspect the values for the panels are being set but the containing labels are not being adjusted accordingly. The actual "Type2" panel consists of 2 labels (header and body) - the anchors for the header are set to "Both" for the Horizontal Anchor and "Top" for the Vertical Anchor; the body anchors are "Both" for the HA and "Bottom" for the VA.
With these settings for the labels, should they not be sized and positioned according to the parent panel?
Thanks
I am using the following code to set the sizes/positions of two types of panels that contain a header and a body label:
B4X:
For Each v As View In Activity
If v Is Panel Then
Dim PanelTag As String
PanelTag = v.Tag
If PanelTag.StartsWith("Type1") Then
If PanelTag.StartsWith("Type2") Then
v.Left = 10%x
v.Top = 10%y
v.Width = 80%x
Else
v.Left = (Activity.Width - v.Width) / 2
v.Top = (Activity.Height - v.Height) / 2
End If
End If
End If
Next
I suspect the values for the panels are being set but the containing labels are not being adjusted accordingly. The actual "Type2" panel consists of 2 labels (header and body) - the anchors for the header are set to "Both" for the Horizontal Anchor and "Top" for the Vertical Anchor; the body anchors are "Both" for the HA and "Bottom" for the VA.
With these settings for the labels, should they not be sized and positioned according to the parent panel?
Thanks
Last edited: