iOS Question Scrollview...

ilan

Expert
Licensed User
Longtime 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)
 

ilan

Expert
Licensed User
Longtime User
In what routine is your code ?
It should be in Page1_Resize !

its in page1_resize...

this is what i get (the black border is the scrollview)

IMG_0099.PNG
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
thanx klaus i will try it (but as far as i remember i tried all available possibilities incl. the one you wrote)
i will try to make a simple project and upload it here...

thanx
 
Upvote 0

ilan

Expert
Licensed User
Longtime 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...
 
Upvote 0
Top