Android Question How to perform a Show event


Well-Known Member
Licensed User
I'm writing a class module on which I want to display a dialog.
I saw about "CustomDialog" and others types and I wish to know how to create the event "Show" of the panel that I create in the class module.
Please, an example code?


Well-Known Member
Licensed User
So, right now I use a CustomDialog.
I've got this problem. If I add a button on a panel and then I call this event

o.AddView(p, 0%x, 15%x, 100%x, 85%y)
The button_click event on the panel p, isn't performed.


Well-Known Member
Licensed User
Dont know; my glas sphere is defect.

With the code you posted NOBODY can give an congrete answer.
What is o? what p? how did you initialize the button? how is you button click event sub signature looking?
Here you are:

Sub Globals
Public edNum1, edNum2 As EditText
Dim cb As CheckBox
Public p As Panel
Public btAgg1, btAgg2 As Button
Public btSot1, btSot2 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
Dim o As CustomDialog

btAgg1.Initialize("btAgg1") : p.AddView ( btAgg1, 0%x, 0%y, 50%x, 7.0%y) : btAgg1.Text = "+"
btAgg2.Initialize("btAgg2") : p.AddView ( btAgg2, 50%x, 0%y, 50%x, 7.0%y) : btAgg2.Text = "+"

edNum1.Initialize("edNum1") : p.AddView ( edNum1,  0%x, 9.4%y, 50%x, 15.6%y) : edNum1.Text = "0"
edNum2.Initialize("edNum2") : p.AddView ( edNum2, 50%x, 9.4%y, 50%x, 15.6%y) : edNum2.Text = "0"

btSot1.Initialize("btSot1") : p.AddView ( btSot1,  0%x, 27.2%y, 50%x, 7.0%y) : btSot1.Text = "-"
btSot2.Initialize("btSot2") : p.AddView ( btSot2, 50%x, 27.2%y, 50%x, 7.0%y) : btSot2.Text = "-"

cb.Initialize("cb") : p.AddView( cb, 1.4%x, 36.7%y, 100%x, 7.0%y) : cb.Checked = False

o.AddView(p, 0%x, 15%x, 100%x, 85%y)
o.Show("fsfd", "yes", "", "no", Null)
End Sub

Sub btAgg1_click
Dim n As Int
n = edNum1.Text
If n = 9 Then n = -1
n = n + 1
edNum1.Text = n
End Sub