J JATAIDE Member Licensed User Longtime User Jul 11, 2012 #1 This may be a simple matter for you but I have been trying and I can not do the following: I created a ScrollView in which also created buttons dynamically. So far all is well. However when I create a function to the button, eg sub r1_Click r1.text = "X" 'or msxbox ("xxxx", "ok") end Sub When I click the button ScrollView no effect. If it is a button created in the designer gives the message correctly. thank you
This may be a simple matter for you but I have been trying and I can not do the following: I created a ScrollView in which also created buttons dynamically. So far all is well. However when I create a function to the button, eg sub r1_Click r1.text = "X" 'or msxbox ("xxxx", "ok") end Sub When I click the button ScrollView no effect. If it is a button created in the designer gives the message correctly. thank you
NJDude Expert Licensed User Longtime User Jul 11, 2012 #2 If you have crated the button manually you must add the EVENT name: Code: Copy Dim r1 As Button ... r1.Initialize("") '<--No event name, therefore the click won't trigger r1.Initialize("r1") '<-- This will do what you need ... Sub r1_Click MsgBox ("xxxx", "ok") End Sub Upvote 0
If you have crated the button manually you must add the EVENT name: Code: Copy Dim r1 As Button ... r1.Initialize("") '<--No event name, therefore the click won't trigger r1.Initialize("r1") '<-- This will do what you need ... Sub r1_Click MsgBox ("xxxx", "ok") End Sub
J JATAIDE Member Licensed User Longtime User Jul 11, 2012 #3 button Ok thanks, I had actually done so: r1.Initialize (r1) and it was well before r1.Initialize ("r1") thank you Upvote 0
button Ok thanks, I had actually done so: r1.Initialize (r1) and it was well before r1.Initialize ("r1") thank you