B4J Question [S O L V E D] modify items in an option in a preferencedialog


Licensed User
hello to all!
i've used form builder to build a form with 2 option fields.
Is there a way to modify the items in the second option when i select one item in the first option?
Thank you


Licensed User
i've modify B4xPreferenceDialog to include what i've asked.
My approach:
1 Public Methods:
public Sub SetOptions2(nkey As Int,nkey_from As Int,sub_to_execute As String)
1 Private Method:
Sub GetPrefItem_by_index (index As Int) As B4XPrefItem
Modification of
Sub lblOptions_MouseClicked
to allow options in runtime.

the public method can be :
1 -
or 2 -
If there are more then one field to include then the first one, is declared with 1 and the second and others with 2. The first parameter is the field to complete ( Option) the second is the field whose value we want ( can be more then 1 field) and the last one is a name or " " if we just want to indicate another field.
The sub_to_execute is a CallSub with 1 parameter that is a list of values taken from the fields of the form ( must be in an activity).