iOS Question Button location is changing

Discussion in 'iOS Questions' started by Shay, Mar 3, 2015.

  1. Shay

    Shay Well-Known Member Licensed User

    I have this code
    if I move from this page and come back to it 2-3 times
    the button either disapear (going down - I can see part of it)
    or cover ~80% of screen, or all page is going up

    Public Sub Initialize
    If Page1.IsInitialized = False Then
            Page1.RootPanel.Color = 
    Colors.RGB (54,54,54)
            Page1.HideBackButton = 
    True ' block button back
    If ButtonClose.IsInitialized = False Then
    End If
            ButtonClose.Visible = 
    If scvMain.IsInitialized = False Then
    End If
            scvMain.Color = 
            scvMain.ScrollEnabled = 
            ButtonClose.CustomLabel.Font  = 
    Font.CreateNew (20)
    End If
    End Sub
    edit: I think it is also the ScrollView is changing location and size (it has same color as my button)

    edit2: I removed the button and I still see this issue, so it is not related to the button, something is very wrong with the scrollview
    Last edited: Mar 3, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    Why don't you add the views with the designer? Otherwise you must handle the Page_Resize event to reposition the views bases on the page size.
  3. Shay

    Shay Well-Known Member Licensed User

    Thanks, issue solved
    I moved it to designer and also had to add the following code:
    scvMain.ContentHeight = 100%y
    scvMain.ContentWidth = 100%x
    Erel likes this.
  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