Android Question Exposing Spinner Properties

Discussion in 'Android Questions' started by RichardN, Nov 26, 2018.

  1. RichardN

    RichardN Active Member Licensed User

    Being able to set view properties by collection is so useful. I have a tablet application that has a complicated interface containing many spinners to set parameters. It would be very useful to set properties like this..... Instead by many single lines of code....
    For Each V As View In pnlMain.GetAllViewsRecursive

    'This works fine
       If V Is Label Then V.Color = Colors.Yellow

    'But .DropdownBackgroundColor is sadly unavailable
       If V Is Spinner Then V.DropdownBackgroundColor = Colors.LightGray

    Is there a way of exposing spinner properties by collection so they can be set en-masse?
  2. DonManfred

    DonManfred Expert Licensed User

    If V Is Spinner Then
    dim sp as spinner = v
       sp.DropdownBackgroundColor = 
    end if
    Last edited: Nov 26, 2018
    Erel, RichardN and BillMeyer like this.
  3. Mahares

    Mahares Well Known Member Licensed User

    I think this line:
    V.DropdownBackgroundColor = Colors.LightGray
    Should be:
    sp.DropdownBackgroundColor = Colors.LightGray
    mangojack and DonManfred like this.
  4. RichardN

    RichardN Active Member Licensed User

    Ah!..... Lateral thinking!
  5. DonManfred

    DonManfred Expert Licensed User

    sure. my fault
  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