iOS Question Panel and scrollview

ginsh

Member
Licensed 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
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...
 

ginsh

Member
Licensed 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

Andrew (Digitwell)

Active Member
Licensed 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

Top