iOS Question Remove horizontal scroll

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)
 

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

Active Member
Licensed User
Hi.
You can add Scollview in activity with increase scrollview width example 4dip(scollbar hidden when scrollview is large ) :)
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
 

Ramezanpour

Active Member
Licensed User
You should post your code so we can see what you have done and how to find what's wrong !
B4X:
'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
 

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

Active 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 :)
dont work !

i want to disable horizontal scrolling
 

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 :).
 
Top