MikeH Well-Known Member Licensed User Longtime User Dec 28, 2012 #1 I`m not sure if this already exists. I searched but didn`t know what to search for, how to describe it. Suppose you have more than one button/panel/whatever that calls the same sub. Presently you have to: B4X: Sub Button1_click SUB1 End Sub Sub Panel1_Click SUB1 End Sub Sub Image1_Click SUB1 End Sub SUB1 Do Something End Sub Would it be possible to do this instead: B4X: Sub Button1_click, Panel1_Click, Image1_Click SUB1 End Sub SUB1 Do Something End Sub Thanks in advance
I`m not sure if this already exists. I searched but didn`t know what to search for, how to describe it. Suppose you have more than one button/panel/whatever that calls the same sub. Presently you have to: B4X: Sub Button1_click SUB1 End Sub Sub Panel1_Click SUB1 End Sub Sub Image1_Click SUB1 End Sub SUB1 Do Something End Sub Would it be possible to do this instead: B4X: Sub Button1_click, Panel1_Click, Image1_Click SUB1 End Sub SUB1 Do Something End Sub Thanks in advance
klaus Expert Licensed User Longtime User Dec 28, 2012 #2 Yes you can. Set the EventName property of the three views to "View". Either in the Designer or in the code when you initialize the views. Then you can have B4X: Sub View_Click Sub1 End Sub Sub Sub1 ' do something End Sub Best regards.
Yes you can. Set the EventName property of the three views to "View". Either in the Designer or in the code when you initialize the views. Then you can have B4X: Sub View_Click Sub1 End Sub Sub Sub1 ' do something End Sub Best regards.
MikeH Well-Known Member Licensed User Longtime User Dec 28, 2012 #3 Thanks Klaus. Now I know how to use Event Name