Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private B4XFloatTextField1 As B4XFloatTextField
Private B4XFloatTextField2 As B4XFloatTextField
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Sleep(1)
Root.LoadLayout("MainPage")
Sleep(1)
Dim base As B4XView = xui.CreatePanel("Panel2")
' Copying dimension and position from first control, positioning second one below, w/o overlapping
Dim heigth As Int = B4XFloatTextField1.mBase.Height
Root.AddView(base, B4XFloatTextField1.mBase.Left, B4XFloatTextField1.mBase.Top + heigth +10dip, B4XFloatTextField1.mBase.Width, heigth)
' Copying textfield visual properties from first control
Dim lbl As B4XView = XUIViewsUtils.CreateLabel
lbl.TextColor = B4XFloatTextField1.TextField.TextColor
lbl.Font = B4XFloatTextField1.TextField.Font
B4XFloatTextField2.Initialize(Me, "B4XFloatTextField2")
B4XFloatTextField2.DesignerCreateView(base, lbl, CreateMap("Hint":"Surname", "HintColor": 0xFF008EFF, "NonFocusedHintColor": 0xFF393939))
End Sub