V vinians Member Licensed User Longtime User Oct 5, 2012 #1 How can I handle a lot of views with the same event handler? It's like a calculator where I have nine number buttons with almost the same behavior.
How can I handle a lot of views with the same event handler? It's like a calculator where I have nine number buttons with almost the same behavior.
Informatix Expert Licensed User Longtime User Oct 5, 2012 #2 vinians said: How can I handle a lot of views with the same event handler? It's like a calculator where I have nine number buttons with almost the same behavior. Click to expand... Use the same prefix for the event handler. Example: B4X: Button1.Initialize("Btn") Button2.Initialize("Btn") Button3.Initialize("Btn") ... Sub Btn_Click Select Sender Case Button1: Upvote 0
vinians said: How can I handle a lot of views with the same event handler? It's like a calculator where I have nine number buttons with almost the same behavior. Click to expand... Use the same prefix for the event handler. Example: B4X: Button1.Initialize("Btn") Button2.Initialize("Btn") Button3.Initialize("Btn") ... Sub Btn_Click Select Sender Case Button1:
NJDude Expert Licensed User Longtime User Oct 5, 2012 #3 Take a look at THIS post, it is something similar to what you are trying to do. Upvote 0
klaus Expert Licensed User Longtime User Oct 5, 2012 #4 Have a look at chapter 3 Second Program in the Beginner's Guide. Best regards. Upvote 0