[B4X] [XUI] AS Settings
Introducing a new library that allows you to create your own settings page with minimal code. This library comes equipped with automatic saving and loading features, making it incredibly easy to manage your settings. It supports booleans, free text, numbers, comboboxes, action buttons and more...
You need AS_Settings V2.00+ for this example
The object property has a new variable called "view". It contains the view with which the user interacts. e.g. for a boolean it is the B4XSwitch, for a text it is the TextField.
In the following example, I deactivate PropertyName_2 and PropertyName_3 whenever PropertyName_1 is not True.
B4X:
Private Sub AS_Settings1_ValueChanged(Property As AS_Settings_Property, Value As Object)
Select Property.PropertyName
Case "PropertyName_1"
AS_Settings1.MainPage.GetProperty("PropertyName_2").View.As(B4XSwitch).Enabled = Value
AS_Settings1.MainPage.GetProperty("PropertyName_3").View.As(B4XSwitch).Enabled = Value
Case Else
Log("PropertyName: " & Property.PropertyName & " Value: " & Value)
End Select
End Sub
Last edited: