OK - I think I've found a way of making the text "draggable" and visible within a panel. What I need to do though is - as I enter text into the EditText box, I want this to update the Label text within the panel. I should then be able to move this around and place it wherever I need it on the panel.
I've used your suggested "Creating a view programatically" as a basis for my trial, but any suggestions for doing the above would be much appreciated.
Here is my code so far:
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim lblTitle, lblPanelTitle As Label
Dim pnlTest As Panel
Dim btnTest As Button
Dim TextBox As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
lblTitle.Initialize("")
lblTitle.Color = Colors.Red
lblTitle.TextSize = 20
lblTitle.TextColor = Colors.Blue
lblTitle.Gravity = Gravity.CENTER_HORIZONTAL + Gravity.CENTER_VERTICAL
lblTitle.Text = "Title"
Activity.AddView(lblTitle, 20%x, 10dip, 60%x, 30dip)
TextBox.Initialize("")
TextBox.Color = Colors.White
TextBox.TextSize = 20
TextBox.TextColor = Colors.Black
TextBox.Gravity = Gravity.LEFT + Gravity.CENTER_VERTICAL
TextBox.Hint = "Enter Your Text Here"
Activity.AddView(TextBox, 0, 50dip, 300dip, 40dip)
pnlTest.Initialize("")
pnlTest.Color = Colors.Blue
btnTest.Initialize("btnTest")
btnTest.Text = "Test"
lblPanelTitle.Initialize("")
lblPanelTitle.Color = Colors.Red
lblPanelTitle.TextSize = 16
lblPanelTitle.TextColor = Colors.Blue
lblPanelTitle.Gravity = Gravity.CENTER_HORIZONTAL + Gravity.CENTER_VERTICAL
lblPanelTitle.Text = "Panel test"
Activity.AddView(pnlTest, 0, lblTitle.Top + lblTitle.Height + TextBox.Top + TextBox.Height + 10dip, 100%x, 50%y)
pnlTest.AddView(lblPanelTitle, 20dip, 10dip, 100dip, 30dip)
pnlTest.AddView(btnTest, 50dip, 50dip, 100dip, 60dip)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
... any tips on how to do this would be great.
Thanks