iOS Question Remove horizontal scroll

Discussion in 'iOS Questions' started by Ramezanpour, Mar 11, 2015.

  1. Ramezanpour

    Ramezanpour Active Member Licensed User

    Hello,

    i want to Remove horizontal scroll

    i create scrollview with:

    cc as CustomListView
    Panel5 as Panel



    Panel5.AddView(cc.AsView,0,0,Panel5.Width,Panel5.Height)
     
  2. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    Hi.
    You can add Scollview in activity with increase scrollview width example 4dip(scollbar hidden when scrollview is large ) :)
     
    Ramezanpour likes this.
  3. Ramezanpour

    Ramezanpour Active Member Licensed User

    please give me a code.

    I add scrollview and load this view with :
    scrollview1.panel.addview ...
    but it size is small (i change width and height but it dont work)

    and again it have horizontal scroll
     
  4. klaus

    klaus Expert Licensed User

    You should post your code so we can see what you have done and how to find what's wrong !
     
    Ramezanpour likes this.
  5. Ramezanpour

    Ramezanpour Active Member Licensed User

    Code:
    'Code module

    Sub Process_Globals
        
    Dim page5 As Page
        
    Dim data As DB
        
    Dim cc As CustomListView
        
    Private Panel5 As Panel

       
    End Sub

    Sub ShowPageMe
        page5.Initialize(
    "page5")
        page5.RootPanel.LoadLayout(
    "page5")
        Main.NavControl.ShowPage(page5)
        cc.Initialize(Me,
    "cvc",100%x)

        data.Initialize
            Panel5.AddView(cc.AsView,
    0,0,Panel5.Width,Panel5.Height)

    Dim list1 As List
       
        
    For i = 0 To list1.Size - 1
           
            
    Dim t1 As Topic
           
            t1.Initialize
            t1 = list1.Get(i)
           
            
    Dim p1 As Panel
            p1.Initialize(
    "")
           
            cc.Add(p1,
    80dip,t1.sID)
            p1.LoadLayout(
    "myapp69")
            
    Next
       
    End Sub
     
  6. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    My solution is :
    Change
    Panel5.AddView(cc.AsView,0,0,Panel5.Width,Panel5.Height)
    To
    Panel5.AddView(cc.AsView,0,0,Panel5.Width+7,Panel5.Height)

    This solution is very easy.
    Because it increase scrollview width and scrollbar set behind of Page :)
     
    Ramezanpour likes this.
  7. Ramezanpour

    Ramezanpour Active Member Licensed User

    dont work !

    i want to disable horizontal scrolling
     
  8. klaus

    klaus Expert Licensed User

    You must somewhere have ScrollView.
    You need to set the ScrollView.ContentWidth = ScrollView.Width
     
    Ramezanpour likes this.
  9. Ramezanpour

    Ramezanpour Active Member Licensed User

    can you give me a code
     
  10. klaus

    klaus Expert Licensed User

    You should post your project as a zip file, or a small one showing the problem, so we can look at it in your conditions.
    As I don't know where the ScrollView is in your project, I suppose in the CustomListView.
    I have never used it.
    Giving you just a code snippet showing the setting of ScrollView.ContentWidth won't for sure not help you.
    Not sure that I could answer you, I'll be on travel for a week since tomorrow. But others for sure will do :).
     
  11. Ramezanpour

    Ramezanpour Active Member Licensed User

    I am grateful for your guidance
     
  12. narek adonts

    narek adonts Well-Known Member Licensed User

    I can not find a ScrollView in your code.
    Could you send the project?

    Narek
     
    Ramezanpour likes this.
  13. Ramezanpour

    Ramezanpour Active Member Licensed User

    Panel5.AddView(cc.AsView,0,0,Panel5.Width,Panel5.Height)

    I send you project files
     
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