mrossen Active Member Licensed User Longtime User Dec 29, 2014 #1 Hi, I have a scrollview there is set to 100%x Width and 100%y in designer script. When i load a layout into it the layout Width is only set to what scrollview.contentwidth is. Ex 100 Is there a way to set scrollview.contentwidth to 100%x and scrollview.contentheigth to 100%y Whar I need is max screenwidth im my scrollview Mogens
Hi, I have a scrollview there is set to 100%x Width and 100%y in designer script. When i load a layout into it the layout Width is only set to what scrollview.contentwidth is. Ex 100 Is there a way to set scrollview.contentwidth to 100%x and scrollview.contentheigth to 100%y Whar I need is max screenwidth im my scrollview Mogens
klaus Expert Licensed User Longtime User Dec 29, 2014 #2 I have a scrollview there is set to 100%x Width and 100%y in designer script. Click to expand... TO set the Width and Height to 100% you don't need to do it in the DesignerScripts, just set the HorizontalAnchor and VerticalAnchor properties to BOTH. Check that the Right Edge Distance and Bottom Edge Distanve properties are 0. You can set the ContentWidth and ContentHeight in the Page1_Resize routine. If you have Width = 100%x and Height = 100%x and you set ContentWidth = 100%x and ContentHeight = 100%y why do you use a ScrollView because there will be no scrolling? Upvote 0
I have a scrollview there is set to 100%x Width and 100%y in designer script. Click to expand... TO set the Width and Height to 100% you don't need to do it in the DesignerScripts, just set the HorizontalAnchor and VerticalAnchor properties to BOTH. Check that the Right Edge Distance and Bottom Edge Distanve properties are 0. You can set the ContentWidth and ContentHeight in the Page1_Resize routine. If you have Width = 100%x and Height = 100%x and you set ContentWidth = 100%x and ContentHeight = 100%y why do you use a ScrollView because there will be no scrolling?
mrossen Active Member Licensed User Longtime User Dec 29, 2014 #3 Thanks for the reply. This make my layout more simple But I still have a problem. When "AutoScaleAll" is active my layout scales up and my scrollview isn't dosn't have the right height. Do I have to disable AutoScalleAll when using scrollview I have attached a sample project with my problem Mogens Attachments Testlayout.zip Testlayout.zip 3.8 KB · Views: 447 Upvote 0
Thanks for the reply. This make my layout more simple But I still have a problem. When "AutoScaleAll" is active my layout scales up and my scrollview isn't dosn't have the right height. Do I have to disable AutoScalleAll when using scrollview I have attached a sample project with my problem Mogens
klaus Expert Licensed User Longtime User Dec 29, 2014 #4 There is something strange with AutoScale and the ScrollView. In your project, changing the ContentHeight property in the Designer changes the visible part on the device !? I think that Erel should check this. Upvote 0
There is something strange with AutoScale and the ScrollView. In your project, changing the ContentHeight property in the Designer changes the visible part on the device !? I think that Erel should check this.
Erel B4X founder Staff member Licensed User Longtime User Dec 30, 2014 #6 Why don't you use CustomListView? klaus said: In your project, changing the ContentHeight property in the Designer changes the visible part on the device !? Click to expand... If I understand correctly then you are seeing the inner panel (the grey panel). I don't see a problem here. You shouldn't use AutoScaleAll for the second layout. What happens here is that there is a circular dependency between Panel1.Height which affects ScrollView.ContentHeight which then affects Panel1.Height again. The value of Panel1.Height is not accurate in Page_Resize event as it was not yet resized. The ContentHeight is not auto scaled. So it doesn't work automatically. Upvote 0
Why don't you use CustomListView? klaus said: In your project, changing the ContentHeight property in the Designer changes the visible part on the device !? Click to expand... If I understand correctly then you are seeing the inner panel (the grey panel). I don't see a problem here. You shouldn't use AutoScaleAll for the second layout. What happens here is that there is a circular dependency between Panel1.Height which affects ScrollView.ContentHeight which then affects Panel1.Height again. The value of Panel1.Height is not accurate in Page_Resize event as it was not yet resized. The ContentHeight is not auto scaled. So it doesn't work automatically.