iOS Question Panel and scrollview

ginsh

Member
Licensed User
Longtime User
Hi,

Anyone please let me know how to add to page a panel with scrollview. I tried to add the scrollview to the panel but the buttons and the other views are getting disabled.

Can anyone share a simple example.
 

hatzisn

Well-Known Member
Licensed User
Longtime User
You can do it with the designer - the easy way - or with this code:

B4X:
Dim pnl as Panel
Dim scv as ScrollView

pnl.Initialize("pnl")
pnl.Width = 200
pnl.Peight = 100

scv.Initialize("scv")
scv.Width = 100
scv.Height = 50

pnl.AddView(scv, ..........)
Page1.Rootpanel.AddView(pnl, ............)


If you did this I do not understand why are the buttons disabled...
 
Upvote 0

ginsh

Member
Licensed User
Longtime User
Hi All,

Still I am unable to make scroll view work. I have attached one sample code. Anyone please add for me a scroll view in the sample project to the "Connect page".

Thanks in advance.
 

Attachments

  • Test Scroll view.zip
    488.8 KB · Views: 175
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Your problem is how you were using the scroll view.
The panel needs to be loaded inside the scrollview and the size of the contents needs to be set correctly.

Normally, I create the scrollview as its own layout and then load the panel and its contents inside.

I have updated your program to fix.

Also you did not release the canvas.
 

Attachments

  • updated.zip
    8.5 KB · Views: 178
Upvote 0
Top