Android Question openspinner with reflector question

Discussion in 'Android Questions' started by giggetto71, Sep 17, 2018.

  1. giggetto71

    giggetto71 Member Licensed User

    Hi,
    I am opening a spinner upon clicking on a label object. In the label click event I call

    Code:
    Sub OpenSpinner(s As Spinner)
        
    Dim r As Reflector, sp As Spinner
        r.Target = s   
        r.RunMethod(
    "performClick")
        
    DoEvents   
    End Sub
    the code works fine but I would like to open the spinner in the same top and left position of the label so before calling the OpenSpinner function, I set both properties but It really looks like only the left property is set..

    Code:
    ....
    spValues.Top = lbl.Top
    spValues.left = lbl.Left
    spValues.Visible = 
    True
    OpenSpinner(spValues)
    ...
    any idea why the top property seems not to set?
    thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The first step is to remove the DoEvents call.

    Try to add Sleep(100) before you call OpenSpinner.
     
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