K kohle Active Member Licensed User Longtime User Mar 18, 2018 #1 There is a scrollview example for b4a (works fine) which i try to adapt to b4i with a problem. B4A : Code: Copy Activity.LoadLayout("layEdit") sv.Panel.LoadLayout("layEditDetail") sv.Panel.Height = PA.Height In B4i I try this : Code: Copy pgED.Initialize("pgED") pgED.RootPanel.LoadLayout("layEdit") sv.Panel.LoadLayout("layEditDetail") sv.ContentHeight = PA.Height sv.ContentWidth = PA.Width The scrolling height is ok, the problem are the fields in PA Panel, they are not autoscaled to the witdth of th scrollview. The width seems to be the width of the panel view.
There is a scrollview example for b4a (works fine) which i try to adapt to b4i with a problem. B4A : Code: Copy Activity.LoadLayout("layEdit") sv.Panel.LoadLayout("layEditDetail") sv.Panel.Height = PA.Height In B4i I try this : Code: Copy pgED.Initialize("pgED") pgED.RootPanel.LoadLayout("layEdit") sv.Panel.LoadLayout("layEditDetail") sv.ContentHeight = PA.Height sv.ContentWidth = PA.Width The scrolling height is ok, the problem are the fields in PA Panel, they are not autoscaled to the witdth of th scrollview. The width seems to be the width of the panel view.
Erel B4X founder Staff member Licensed User Longtime User Mar 18, 2018 #2 It is a mistake to load the layout before the inner panel size is set (in both B4A and B4i). First set ContentHeight and ContentWidth and then load the layout. Upvote 0
It is a mistake to load the layout before the inner panel size is set (in both B4A and B4i). First set ContentHeight and ContentWidth and then load the layout.
K kohle Active Member Licensed User Longtime User Mar 18, 2018 #3 Erel said: It is a mistake to load the layout before the inner panel size is set (in both B4A and B4i). First set ContentHeight and ContentWidth and then load the layout. Click to expand... I dont know the height and the width of "layEditDetail" (tall panel) befote I load it. Upvote 0
Erel said: It is a mistake to load the layout before the inner panel size is set (in both B4A and B4i). First set ContentHeight and ContentWidth and then load the layout. Click to expand... I dont know the height and the width of "layEditDetail" (tall panel) befote I load it.
Erel B4X founder Staff member Licensed User Longtime User Mar 18, 2018 #4 It is always the container that sets the layout size. The layout itself never has any intrinsic size. You should set it the way you want it. Upvote 0
It is always the container that sets the layout size. The layout itself never has any intrinsic size. You should set it the way you want it.
K kohle Active Member Licensed User Longtime User Mar 18, 2018 #5 understand. solved it. Thanks Upvote 0