B4J Question [SOLVED] Prefdialog: is it possible to vary precompiled fields by choosing one of the options inside the Prefdialog?

Elric

Well-Known Member
Licensed User
Hello!

I’ll try to explain.

I've a subroutine to create a new user, John Smith, who belongs to the Smith Family.

The Smith Family lives in no. 1 Boardwalk, London.

To create a new user, I use a Prefdialog, with "Username" [text], "Family" [list of options], Street [text], House Number [text], City [text].

As "Family" I may choose between "Smith", "Jones" and "Williams".

I wonder if, once you have selected the "Family" from the list of options, you can have the fields "Street", "House Number" and "City" filled automatically inside the Prefdialog opened but leaving them editable anyway, in case John Smith, still belonging to the Smith Family, went to live in no. 6 Whitechapel Road, Venice.

Thanks!
 

LucaMs

Expert
Licensed User
Longtime User
  1. Do you have to use a dialog for that purpose? Why not a B4XPage (or Activity, if you don't use B4XPages)?
  2. Why PrefDialog instead of a B4XDialog, with your own custom template?
  3. In any case, if you use a B4XComboBox (one of the XUI Views) to select a "Family", you should use its SelectedIndexChanged event, from within which "fill in" the rest of the "form".
 
Last edited:
Upvote 0

Elric

Well-Known Member
Licensed User
I'd like to be a wizard but unfortunately I'm not! :)

I need to study better B4XDialog; at present creating a new B4XPage seems the simplest way to me!

Thank you!
 
Upvote 0
Top