Hi,
reason for mixing is, that i was testing different ways of positioning of buttons in order to get click event.
below is code for activity_create and click events for buttons. in this case buttons b1,b2, b3, btnDB and btnCVS are responsive for clicking, others not.
i can add whole project, if needed, it is still in development...
Sub Activity_Create(FirstTime AsBoolean)
If FirstTime Then
' File.Delete(File.DirDefaultExternal, DBFileName) ' for testing to remove an old file
IfFile.Exists(File.DirDefaultExternal, DBFileName) = FalseThen
File.Copy(File.DirAssets, DBFileName, DBFileDir, DBFileName)
EndIf
SQL1.Initialize(DBFileDir, DBFileName, True)
EndIf
b1.Initialize("b1")
Activity.AddView(b1, 68%x, 10%y -60dip, 10%x, 50dip)
b1.text = "1"
b2.Initialize("b2")
Activity.AddView(b2, 78%x, 10%y -60dip, 10%x, 50dip)
b2.text = "2"
b3.Initialize("b3")
Activity.AddView(b3, 88%x, 10%y -60dip, 10%x, 50dip)
b3.text = "3"
b4.Initialize("b4")
Activity.AddView(b4, 68%x, 20%y - 60dip, 10%x, 50dip)
b4.text = "4"
b5.Initialize("b5")
Activity.AddView(b5, 78%x, 20%y - 60dip, 10%x, 50dip)
b5.text = "5"
b6.Initialize("b6")
Activity.AddView(b6, 88%x, 20%y - 60dip, 10%x, 50dip)
b6.text = "6"
b7.Initialize("b7")
Activity.AddView(b7, 68%x, 30%y - 60dip, 10%x, 50dip)
b7.text = "7"
b8.Initialize("b8")
Activity.AddView(b8, 78%x, 30%y - 60dip, 10%x, 50dip)
b8.text = "8"
b9.Initialize("b9")
Activity.AddView(b9, 88%x, 30%y - 60dip, 10%x, 50dip)
b9.text = "9"
bo.Initialize("bo")
Activity.AddView(bo, 78%x, 40%y - 60dip, 10%x, 50dip)
bo.text = "0"
Potrdi.Initialize("Potrdi")
Activity.AddView(Potrdi, 78%x, 60%y - 60dip, 10%x, 50dip)
Potrdi.text = "Potrdi"
btnDB.Initialize("btnDB")
Activity.AddView(btnDB, 34%x, 100%y - 60dip, 30%x, 50dip)
btnDB.text = "SwapDB"
textbox.Initialize("btnDB")
Activity.AddView(textbox, 2%x, 100%y - 60dip, 30%x, 50dip)
textbox.text = "stevilo"
btnCVS.Initialize("btnCVS")
Activity.AddView(btnCVS, 68%x, 100%y - 60dip, 30%x, 50dip)
btnCVS.text = "CVS"
pnlTable.Initialize("")
Activity.AddView(pnlTable, 20dip, 20dip, 100%x - 40dip, 100%y - 90dip)
Table1.Initialize(Me, "Table1", 5, Gravity.CENTER_HORIZONTAL, True)
Table1.CellAlignment = Bit.OR(Gravity.LEFT, Gravity.CENTER_VERTICAL)
Table1.HeaderColor = Colors.Blue
Table1.HeaderTextColor = Colors.Yellow
Table1.TextColor = Colors.Blue
Table1.TableColor = Colors.Red
Table1.RowHeight = 50dip
Table1.AllowSelection = False
Table1.AddToActivity(pnlTable, 0, 0, pnlTable.Width, pnlTable.Height)
' Table1.MultiSelect = True
Table1.MultiSelect = False
Table1.SortColumn = False
Table1.SingleLine = False
FillTableCSV
End Sub
clik events:
Sub bo_Click()
textbox.Text= textbox.text.trim & "0"
End Sub
Sub b1_Click()
textbox.Text= textbox.text.Trim & "1"
End Sub
Sub b2_Click()
textbox.Text= textbox.text.trim & "2"
End Sub
Sub b3_Click()
textbox.Text= textbox.text.trim & "3"
End Sub
Sub b4_Click()
textbox.Text= textbox.text.trim & "4"
End Sub
Sub b5_Click
textbox.Text= textbox.text.trim & "5"
End Sub