Chris Guanzon Active Member Licensed User Longtime User Sep 23, 2020 #1 Hello, how to auto resize pane inside the scroll pane when resizing the form? I've anchored the pane and the scroll pane, but the pane is not resizing according to the size of the scroll pane. attached file is the sample code. Attachments test1.zip test1.zip 2.8 KB · Views: 644
Hello, how to auto resize pane inside the scroll pane when resizing the form? I've anchored the pane and the scroll pane, but the pane is not resizing according to the size of the scroll pane. attached file is the sample code.
Erel B4X founder Staff member Licensed User Longtime User Sep 23, 2020 #2 Don't confuse the ScrollPane dimensions with the ScrollPane inner panel dimensions. There is no relation between the two. The whole idea of using ScrollPane is that it allows you to set the internal width and height to larger values. Upvote 0
Don't confuse the ScrollPane dimensions with the ScrollPane inner panel dimensions. There is no relation between the two. The whole idea of using ScrollPane is that it allows you to set the internal width and height to larger values.
Chris Guanzon Active Member Licensed User Longtime User Sep 23, 2020 #3 Erel said: Don't confuse the ScrollPane dimensions with the ScrollPane inner panel dimensions. There is no relation between the two. The whole idea of using ScrollPane is that it allows you to set the internal width and height to larger values. Click to expand... Is scrollpane not like scrollpanel in b4a? I want the panel to auto-resize if i resize the form. The reason why i used the scroll pane is because I have a layout with panel and inside the panel are textfields, labels, comboboxes etc. Now, the 800x600 variant is not enough for all the views I've added (it is for registration actually). I want the user to use the scroll and also to resize the conponents inside the panel when the user resize the form. Or Is there other way to do it? Upvote 0
Erel said: Don't confuse the ScrollPane dimensions with the ScrollPane inner panel dimensions. There is no relation between the two. The whole idea of using ScrollPane is that it allows you to set the internal width and height to larger values. Click to expand... Is scrollpane not like scrollpanel in b4a? I want the panel to auto-resize if i resize the form. The reason why i used the scroll pane is because I have a layout with panel and inside the panel are textfields, labels, comboboxes etc. Now, the 800x600 variant is not enough for all the views I've added (it is for registration actually). I want the user to use the scroll and also to resize the conponents inside the panel when the user resize the form. Or Is there other way to do it?
Erel B4X founder Staff member Licensed User Longtime User Sep 23, 2020 #4 It is the same as ScrollView. The mistake you made is that you set the inner panel size to MainForm.Width and MainForm.Height. The correct size should be the absolute size of the internal layout. Upvote 0
It is the same as ScrollView. The mistake you made is that you set the inner panel size to MainForm.Width and MainForm.Height. The correct size should be the absolute size of the internal layout.
Chris Guanzon Active Member Licensed User Longtime User Sep 23, 2020 #5 Erel said: It is the same as ScrollView. The mistake you made is that you set the inner panel size to MainForm.Width and MainForm.Height. The correct size should be the absolute size of the internal layout. Click to expand... How can I do that? If I change the width and the height to this Code: ScrollPane1.LoadLayout("Layout2", 800, 1600) . The height is ok but the width is not ok, it is not resizing according to the form width. Upvote 0
Erel said: It is the same as ScrollView. The mistake you made is that you set the inner panel size to MainForm.Width and MainForm.Height. The correct size should be the absolute size of the internal layout. Click to expand... How can I do that? If I change the width and the height to this Code: ScrollPane1.LoadLayout("Layout2", 800, 1600) . The height is ok but the width is not ok, it is not resizing according to the form width.
Erel B4X founder Staff member Licensed User Longtime User Sep 23, 2020 #6 The inner panel size shouldn't be resized. Never. You need to decide on the size of Layout2 and set it. It if it is larger than the form size then the user will need to scroll it. This is exactly the reason for having a ScrollPane. Upvote 0
The inner panel size shouldn't be resized. Never. You need to decide on the size of Layout2 and set it. It if it is larger than the form size then the user will need to scroll it. This is exactly the reason for having a ScrollPane.
Chris Guanzon Active Member Licensed User Longtime User Sep 23, 2020 #7 Erel said: The inner panel size shouldn't be resized. Never. You need to decide on the size of Layout2 and set it. It if it is larger than the form size then the user will need to scroll it. This is exactly the reason for having a ScrollPane. Click to expand... Thank you sir @Erel, will decide the size of my 2nd layout. thanks again so much. Upvote 0
Erel said: The inner panel size shouldn't be resized. Never. You need to decide on the size of Layout2 and set it. It if it is larger than the form size then the user will need to scroll it. This is exactly the reason for having a ScrollPane. Click to expand... Thank you sir @Erel, will decide the size of my 2nd layout. thanks again so much.