iOS Question Scrollview...

ilan

Expert
Licensed User
hi everyone...

i have difficulty to use the scrollview in b4i

i am trying to add a panel to it but the panel is not showing correct (i see only a part of the panel)
and its also not in the right left and top position i set (0,0)

this is my code what is wrong please?? (i am adding the scrollview in designer and also the panel)

B4X:
scr1.ContentWidth = menuchoose.Width
scr1.ContentHeight = menuchoose.Height
scr1.Panel.AddView(menuchoose,0,0,scr1.Width,scr1.Height)
 

klaus

Expert
Licensed User
Try this:
B4X:
scr1.Panel.AddView(menuchoose,0,0,scr1.Width,scr1.Height)
scr1.ContentWidth = menuchoose.Width
scr1.ContentHeight = menuchoose.Height
Or post a small project showing the problem.
 

ilan

Expert
Licensed User
thanx klaus i figured it out

this code worked for me:

B4X:
scr1.Panel.AddView(menuchoose,0,0,menuchoose.Width,menuchoose.Height)
scr1.ContentHeight = menuchoose.Height
scr1.ContentWidth = menuchoose.Width
my mistake was that after i add the panel to the scrview i changed the left pos. of the panel... (because i didnot used any scrview in the first version)
now i delete those lines and it worked...

thanx a lot...
 
Top