P Penko Active Member Licensed User Longtime User Mar 23, 2012 #1 Hello! Check this screenshot: http://software.kms-e.com/repo/b4a_scrollview_width.jpg You see the black gap on the right. It should be there. For example, the button is handled correctly. Note that this is the visualisation only. It works perfectly running on the real device. Is there something I am missing?
Hello! Check this screenshot: http://software.kms-e.com/repo/b4a_scrollview_width.jpg You see the black gap on the right. It should be there. For example, the button is handled correctly. Note that this is the visualisation only. It works perfectly running on the real device. Is there something I am missing?
Erel B4X founder Staff member Licensed User Longtime User Mar 24, 2012 #2 Just to make sure, did you press F5 after you updated the script? Can you upload this layout file?
P Penko Active Member Licensed User Longtime User Mar 24, 2012 #3 Yes, Erel. On the Main tab, the view is displayed properly because I have expanded it to the maximum width. Going to the Scripts tab and running the script, the view is smaller than 100%x(as you see on the screenshot). I am attaching the view as well as the designer script. The designer code: Code: Copy 'All variants script btnAdd.Bottom = 100%y '5dip btnAdd.Width = 100%x scrollViewMain.Width = 100%x scrollViewMain.Height = 100%y - btnAdd.Height Erel, note that I noticed the same behavior for panels too. On another view of mine, I am doing almost the same and the panel is also not expanded to the maximum width. But fortunately, this is only a visualization issue. P.S The forum system doesn't allow .bal files to be attached without zipping. Attachments laytests_def.zip laytests_def.zip 1.1 KB · Views: 395 LS_laytests_def.zip LS_laytests_def.zip 437 bytes · Views: 372 Last edited: Mar 24, 2012
Yes, Erel. On the Main tab, the view is displayed properly because I have expanded it to the maximum width. Going to the Scripts tab and running the script, the view is smaller than 100%x(as you see on the screenshot). I am attaching the view as well as the designer script. The designer code: Code: Copy 'All variants script btnAdd.Bottom = 100%y '5dip btnAdd.Width = 100%x scrollViewMain.Width = 100%x scrollViewMain.Height = 100%y - btnAdd.Height Erel, note that I noticed the same behavior for panels too. On another view of mine, I am doing almost the same and the panel is also not expanded to the maximum width. But fortunately, this is only a visualization issue. P.S The forum system doesn't allow .bal files to be attached without zipping.
Erel B4X founder Staff member Licensed User Longtime User Mar 24, 2012 #4 The ScrollView left property is -10. Move it to 0 (or set in the script) and it will be fine.
P Penko Active Member Licensed User Longtime User Mar 24, 2012 #5 Thanks, sorry for the stupid question . Maybe it's worth forcing all items to Left = 0 by code to ensure everything is okay.
Thanks, sorry for the stupid question . Maybe it's worth forcing all items to Left = 0 by code to ensure everything is okay.
Erel B4X founder Staff member Licensed User Longtime User Mar 24, 2012 #6 You can use: Code: Copy ScrollView.SetLeftAndRight(0, 100%x)