P Pantelis Member Licensed User Longtime User May 27, 2013 #1 Hi I add a scrollview with the Designer. How to add other Views on that ScrollView? I don't find any way to add those views from the Designer. Is there any way? Thanks
Hi I add a scrollview with the Designer. How to add other Views on that ScrollView? I don't find any way to add those views from the Designer. Is there any way? Thanks
Erel B4X founder Staff member Licensed User Longtime User May 28, 2013 #2 It is not possible to directly add views to ScrollView with the designer. You can however create another layout file and then load this layout file with ScrollView.Panel.LoadLayout. Upvote 0
It is not possible to directly add views to ScrollView with the designer. You can however create another layout file and then load this layout file with ScrollView.Panel.LoadLayout.
P Pantelis Member Licensed User Longtime User May 28, 2013 #3 Thank your Erel. I am trying to make a layout for my Scroll View. I know how may dips in width and height i need totaly for my Views so i set ScrollView with those dimensions in dips. And then i try to create the layout with the same dimensions. When i create a new layout i must create a new variant layout? In the new variant window i must set the Width and Heigth in pixels. I try to create a Variant with 100x100 scale 1 and then i add a button 100dip by 100dip to see if fits corectly. The width fits exactly but the height of the variant layout is half of the size of my button. Then i try to create a new variant layout 400x400 and add a new button 400dip by 400dip. This time the width of the variant layout also fits exactly with the button but the height are not the half as before but a little smaller than my button. Why this happns? How to calculate the proper values in pixels so that the layout fits exactly on the Scrollview? Upvote 0
Thank your Erel. I am trying to make a layout for my Scroll View. I know how may dips in width and height i need totaly for my Views so i set ScrollView with those dimensions in dips. And then i try to create the layout with the same dimensions. When i create a new layout i must create a new variant layout? In the new variant window i must set the Width and Heigth in pixels. I try to create a Variant with 100x100 scale 1 and then i add a button 100dip by 100dip to see if fits corectly. The width fits exactly but the height of the variant layout is half of the size of my button. Then i try to create a new variant layout 400x400 and add a new button 400dip by 400dip. This time the width of the variant layout also fits exactly with the button but the height are not the half as before but a little smaller than my button. Why this happns? How to calculate the proper values in pixels so that the layout fits exactly on the Scrollview?
klaus Expert Licensed User Longtime User May 28, 2013 #4 Have a look at this thread ScrollView examples summary where you find several examples with code. Especially this one. Or this one. Best regards. Upvote 0
Have a look at this thread ScrollView examples summary where you find several examples with code. Especially this one. Or this one. Best regards.
P Pantelis Member Licensed User Longtime User May 28, 2013 #5 Hi Klaus. Thank you for reply. I find your third link usefull. So, the views can be placed outside the limits of scrollviewlayout with no problem and there is no need to find the resolution of scrollviewlayout in pixels? Why you use a panel with views on a scrollviewlayout and not just those views on the scrollviewlayout? This is necessary or optional? Upvote 0
Hi Klaus. Thank you for reply. I find your third link usefull. So, the views can be placed outside the limits of scrollviewlayout with no problem and there is no need to find the resolution of scrollviewlayout in pixels? Why you use a panel with views on a scrollviewlayout and not just those views on the scrollviewlayout? This is necessary or optional?
klaus Expert Licensed User Longtime User May 28, 2013 #6 The panel is used to be able to add views outsides the screen area. You can't do this without a panel. You can 'move' vertically the panel in the Designer by changing the panels Top property with negative values. If you have many views to add it would be better to add them in the code. Best regards. Upvote 0
The panel is used to be able to add views outsides the screen area. You can't do this without a panel. You can 'move' vertically the panel in the Designer by changing the panels Top property with negative values. If you have many views to add it would be better to add them in the code. Best regards.
P Pantelis Member Licensed User Longtime User May 29, 2013 #7 Thank you very much Klaus. This tip of moving the panel out of screen is very very useful Upvote 0