Albert1996 Member Licensed User Longtime User Sep 29, 2011 #1 How I can disable all on a form without a timer?
Erel B4X founder Staff member Licensed User Longtime User Oct 2, 2011 #2 Do you want to disable all views? B4X: For i = 0 To Activity.NumberOfViews - 1 Dim v As View v = Activity.GetView(i) v.Enabled = False End If
Do you want to disable all views? B4X: For i = 0 To Activity.NumberOfViews - 1 Dim v As View v = Activity.GetView(i) v.Enabled = False End If
Albert1996 Member Licensed User Longtime User Oct 2, 2011 #3 Error When I run the program I get this error Attachments error.jpg 57.7 KB · Views: 235
Erel B4X founder Staff member Licensed User Longtime User Oct 2, 2011 #4 I'm sorry I posted Basic4android code. Try this code: B4X: Sub Globals Dim names(0) As String End Sub Sub App_Start Form1.Show DisableAll End Sub Sub DisableAll names() = GetControls("Form1") For i = 0 To ArrayLen(names()) - 1 Control(names(i)).Enabled = False Next End Sub
I'm sorry I posted Basic4android code. Try this code: B4X: Sub Globals Dim names(0) As String End Sub Sub App_Start Form1.Show DisableAll End Sub Sub DisableAll names() = GetControls("Form1") For i = 0 To ArrayLen(names()) - 1 Control(names(i)).Enabled = False Next End Sub