powerino Active Member Licensed User Aug 15, 2018 #1 Hello, it is possible to disable all buttons in a Activity... I made this: B4X: Button1.Enabled=False Button2.Enabled=False Button3.Enabled=False Button4.Enabled=False Button5.Enabled=False Button6.Enabled=False Button7.Enabled=False Button8.Enabled=False Button9.Enabled=False It is possible with a "for each" or similary? thanks
Hello, it is possible to disable all buttons in a Activity... I made this: B4X: Button1.Enabled=False Button2.Enabled=False Button3.Enabled=False Button4.Enabled=False Button5.Enabled=False Button6.Enabled=False Button7.Enabled=False Button8.Enabled=False Button9.Enabled=False It is possible with a "for each" or similary? thanks
Erel B4X founder Staff member Licensed User Longtime User Aug 15, 2018 #2 B4X: For Each v As View In Activity.GetAllViewsRecursive If v Is Button Then v.Enabled = False Next Upvote 0
powerino Active Member Licensed User Aug 15, 2018 #3 Thanks a lot. Is it possible to "combine" the name with the numbers (button1, button2) for disable or enable?????? Example: B4X: for i=1 to 9 Button&i.disable=true next Upvote 0
Thanks a lot. Is it possible to "combine" the name with the numbers (button1, button2) for disable or enable?????? Example: B4X: for i=1 to 9 Button&i.disable=true next
Erel B4X founder Staff member Licensed User Longtime User Aug 15, 2018 #4 Yes, if you learn how to use a Map. Watch the Collections video tutorial. Upvote 0
klaus Expert Licensed User Longtime User Aug 15, 2018 #6 You could also use an Array of buttons. Private Buttons() as Button Buttons = Array As Button (Button1, Button2, Button3, etc>) Be avare that the Array begins with index 0, therefor Botton(0) is Button1. The solution is HERE. Last edited: Aug 16, 2018 Upvote 0
You could also use an Array of buttons. Private Buttons() as Button Buttons = Array As Button (Button1, Button2, Button3, etc>) Be avare that the Array begins with index 0, therefor Botton(0) is Button1. The solution is HERE.