Rudi_ Member Licensed User Longtime User Apr 4, 2014 #1 can i use several imageviews with only one click event as i would with buttons like "ImageViews_Click"
can i use several imageviews with only one click event as i would with buttons like "ImageViews_Click"
DonManfred Expert Licensed User Longtime User Apr 4, 2014 #2 yes B4X: Dim img1, img2, img3 As ImageView img1.Initialize("ImageView") img2.Initialize("ImageView") img3.Initialize("ImageView") Last edited: Apr 4, 2014 Upvote 0
yes B4X: Dim img1, img2, img3 As ImageView img1.Initialize("ImageView") img2.Initialize("ImageView") img3.Initialize("ImageView")
Rudi_ Member Licensed User Longtime User Apr 4, 2014 #3 works this with imageviews added in the designer Upvote 0
klaus Expert Licensed User Longtime User Apr 4, 2014 #4 Sure, set the EventName the same for all ImageViews. Use Sender in the Event routine(s) to know what view raised the event. Example in chapter 3 Second program in the Beginner's Guide (with Buttons, but the principle is the same). Upvote 0
Sure, set the EventName the same for all ImageViews. Use Sender in the Event routine(s) to know what view raised the event. Example in chapter 3 Second program in the Beginner's Guide (with Buttons, but the principle is the same).
metheoneandonly Member Licensed User Longtime User May 3, 2014 #5 Please, how to check in runtime which image is loaded into ImageView? Can someone give me a sample of code? Thanks in advance! Upvote 0
Please, how to check in runtime which image is loaded into ImageView? Can someone give me a sample of code? Thanks in advance!
DonManfred Expert Licensed User Longtime User May 3, 2014 #6 You can use the Tag-Property of the imageview to store what you loaded there B4X: img1.Tag = "Picture 12323" Upvote 0
You can use the Tag-Property of the imageview to store what you loaded there B4X: img1.Tag = "Picture 12323"