Scvfiles.width determine the width of scrollview but NOT the width of panels contained, so the panels results more shorts...
The dlass clschecklist manages panels dimension in the scrollview..
If you use a normal vertical ScrollView (not a ScrollView2D object), there's no reason to change the panel width. If really needed, just set the panel width to a new value. Where's the problem ?
You have the source code. Why don't you read it/change it?
Of course i've read the code..
I asked if there's a method to change these values by parameters, without change your class (to mantain your class for future update...) because I have to change the width (and also font size) dinamically.
Ok i'll change your class if this is the only possibiity..
Of course i've read the code..
I asked if there's a method to change these values by parameters, without change your class (to mantain your class for future update...) because I have to change the width (and also font size) dinamically.
Ok i'll change your class if this is the only possibiity..
There's absolutely nothing to change in the class since it doesn't change any width once the list is filled. And if you want to change a width, it's as simple as width = new value (width can be the scrollview panel width or the item panel width). So I really don't understand the problem.
ok. i solved, the problem was in panel configuration and it was not necessary modify the class, as your information.
B4X:
Dim scvFiles As ScrollView
Dim pnlAudio As Panel
.....
pnlAudio.AddView(scvFiles, 0, 0, wwww, hhhhh )
...
where wwww=width and hhhh=height of panel
For the fonts size instead, i need to modify the class clsCheckList in sub AddItemNoChkbx
B4X:
Public Sub AddItemNoChkbx(ID As Object, Text1 As String, Text2 As String, Image As Bitmap)
....
lbl1.TextSize = 18dip '<<< UPDATE
lbl2.TextSize = 12dip '<<< UPDATE
....
ok. i solved, the problem was in panel configuration and it was not necessary modify the class, as your information.
B4X:
Dim scvFiles As ScrollView
Dim pnlAudio As Panel
.....
pnlAudio.AddView(scvFiles, 0, 0, wwww, hhhhh )
...
where wwww=width and hhhh=height of panel
For the fonts size instead, i need to modify the class clsCheckList in sub AddItemNoChkbx
B4X:
Public Sub AddItemNoChkbx(ID As Object, Text1 As String, Text2 As String, Image As Bitmap)
....
lbl1.TextSize = 18dip '<<< UPDATE
lbl2.TextSize = 12dip '<<< UPDATE
....
If your panel size is subject to frequent changes, you can set the width and height of the ScrollView to -1 (not tested, but that should work). This value means "FILL_PARENT". The ScrollView will be automatically resized when the panel size changes.
For the font size, you can modify the class, of course, but you can also create custom content and add it with AddCustomItem. Beware: don't set TextSize in DIPs (it is already measured in physical units).