toby Well-Known Member Licensed User Longtime User Feb 5, 2023 #1 I want the screen to be split into left half and right half of equal width. Each side contains a label and customlistview. Problems I'm having: 1. Right side is wider than the left side. 2. Some chars are not visible on the left side. I've tried by anchoring and designer scripts to no vail. I would appreciate if someone could show me how to achieve what I want. test app and screenshot attached. TIA Attachments sideBySide.jpg 127.3 KB · Views: 325 sideBySideClvs.zip sideBySideClvs.zip 19.7 KB · Views: 261
I want the screen to be split into left half and right half of equal width. Each side contains a label and customlistview. Problems I'm having: 1. Right side is wider than the left side. 2. Some chars are not visible on the left side. I've tried by anchoring and designer scripts to no vail. I would appreciate if someone could show me how to achieve what I want. test app and screenshot attached. TIA
Solution P P PaulMeuris Feb 5, 2023 You could do this without the panels... Set the width of the labels and customlistviews to the same width for instance 160. Use vertical anchors with the customlistviews and set the designer script to the following: Code: Copy 'All variants script 'AutoScaleAll lblAvailable.SetLeftAndRight(0%x,49%x) lblAddedItems.SetLeftAndRight(50%x,99%x) clv1.SetLeftAndRight(0%x,49%x) clv2.SetLeftAndRight(50%x,99%x) The AutoScaleAll is commented because the scaling is done by the other settings. This should give you the result you see above.
You could do this without the panels... Set the width of the labels and customlistviews to the same width for instance 160. Use vertical anchors with the customlistviews and set the designer script to the following: Code: Copy 'All variants script 'AutoScaleAll lblAvailable.SetLeftAndRight(0%x,49%x) lblAddedItems.SetLeftAndRight(50%x,99%x) clv1.SetLeftAndRight(0%x,49%x) clv2.SetLeftAndRight(50%x,99%x) The AutoScaleAll is commented because the scaling is done by the other settings. This should give you the result you see above.
P PaulMeuris Well-Known Member Licensed User Feb 5, 2023 #2 You could do this without the panels... Set the width of the labels and customlistviews to the same width for instance 160. Use vertical anchors with the customlistviews and set the designer script to the following: Code: Copy 'All variants script 'AutoScaleAll lblAvailable.SetLeftAndRight(0%x,49%x) lblAddedItems.SetLeftAndRight(50%x,99%x) clv1.SetLeftAndRight(0%x,49%x) clv2.SetLeftAndRight(50%x,99%x) The AutoScaleAll is commented because the scaling is done by the other settings. This should give you the result you see above. Upvote 1 Solution
You could do this without the panels... Set the width of the labels and customlistviews to the same width for instance 160. Use vertical anchors with the customlistviews and set the designer script to the following: Code: Copy 'All variants script 'AutoScaleAll lblAvailable.SetLeftAndRight(0%x,49%x) lblAddedItems.SetLeftAndRight(50%x,99%x) clv1.SetLeftAndRight(0%x,49%x) clv2.SetLeftAndRight(50%x,99%x) The AutoScaleAll is commented because the scaling is done by the other settings. This should give you the result you see above.
Erel B4X founder Staff member Licensed User Longtime User Feb 5, 2023 #3 Check this: https://www.b4x.com/android/forum/threads/double-column-customlistview.115954/post-724715 Upvote 0
Check this: https://www.b4x.com/android/forum/threads/double-column-customlistview.115954/post-724715