Sub Class_Globals
Dim Control As Object
Private Panel1 As Panel
Private Label1 As Label
End Sub
'Initializes the object. You can add parameters to this method if needed.
Sub Initialize()
Panel1.Initialize("Panel1")
Control = Panel1
Panel1.Color = Colors.Magenta
Label1.Initialize("")
Label1.TextColor = Colors.Black
Label1.TextSize = 20
Label1.Text = "Test"
Label1.Gravity = Gravity.CENTER_HORIZONTAL + Gravity.CENTER_VERTICAL
Panel1.AddView(Label1, 0, 0, 10,10)
End Sub
Public Sub SetLayout(Left As Int, Top As Int, Width As Int, Height As Int)
Panel1.SetLayout(Left, Top, Width, Height)
Label1.SetLayout(0,0,Width, Height)
End Sub
Sub Panel1_Click()
'and now?
'...
End Sub