TabView & ScrollView: so confused...

max19871

Member
Licensed User
Longtime User
I'm (try) to build a preferences panel for my app and i would like to make vertical scrollable TabView panel, but i can't get it to work... is it possible?? :sign0104:
 

klaus

Expert
Licensed User
Longtime User
What exactly do you mean with TabView panel ?

Attached a demo program with a TabHost View with two tabs with ScrollViews.

Best regards.

EDIT.
Amended the error reported here.
 

Attachments

  • TabHostScrollView1.jpg
    TabHostScrollView1.jpg
    39.9 KB · Views: 32,242
  • TabHostScrollView2.jpg
    TabHostScrollView2.jpg
    38.7 KB · Views: 32,077
  • TabHostScrollViews.zip
    6.4 KB · Views: 1,293
Last edited:
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Quick Question:

B4X:
   For i=0 To i1
      Dim lbl As Label
      lbl.Initialize("lbl1")
      lbl.Color = Colors.Blue
      lbl.Tag=i
      lbl.Text = "Test1 line # "&i
      scvTest1.Panel.AddView(lbl,0,i*lblHeight1,100%x,lblHeight)
      scvTest1.Panel.Height = i1*lblHeight1
   Next

In the above code (taken from the tabhost/scrollview demo), why is
B4X:
scvTest1.Panel.Height = i1*lblHeight1
in the For loop. Doesn't this just set the height of the scrollview and use variables set outside the loop therefore setting with same value each time? That's how I read it anyway.

Also, I Don't see any code to set the width of the scrollviews. Is this not needed? Does it default to 100%x?

Cheers
 
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
No worries klaus. You deserve a break. See you soon. Thanks again.

Sent from my Desire Z
 
Upvote 0
Top