Android Question [B4X] B4XPreferencesDialog set options per code

Discussion in 'Android Questions' started by Alexander Stolte, May 20, 2019.

  1. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    Hey, if i create a layout with the Form Builder with the type "Short Options" how can i set the "Options" on the code ?

    upload_2019-5-20_13-38-21.png
     
  2. jimmyF

    jimmyF Active Member Licensed User

    Code:
    Dim ls As List
    ls.Initialize
    ls.AddAll(
    Array As String("Mon","Tues"))
    prefdialog.AddShortOptionsItem(
    "test","Test",ls)
    ls.Add(
    "Wed")
    prefdialog.SetOptions(
    "test",ls)
    EDIT
     
    DonManfred and Alexander Stolte like this.
  3. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    Thx :)
     
    jimmyF likes this.
  4. jimmyF

    jimmyF Active Member Licensed User

    You can also use the SetOptions command on the Short Options

    Code:
    ls.Add("Wed")
    prefdialog.SetOptions(
    "test",ls)
     
  5. Alexander Stolte

    Alexander Stolte Well-Known Member Licensed User

    Ahh, this is what i want! :)
     
    jimmyF likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice