ilan Expert Licensed User Longtime User Sep 1, 2015 #1 hi i have a question, on every app start i load a layout to page1 after app_start event was fired the page1_resize event is called and there i re-size all my views. no the question is if i load a different layout to my page when my app is running (not on app start) will Page1_Resize event again called? i dont want to make the resize in the designer, i want to make it in my code like this (i know i can create a new sub or just call the page1_resize sub after layout is loaded but i dont want to do it twice, thats why i am asking...) thanx
hi i have a question, on every app start i load a layout to page1 after app_start event was fired the page1_resize event is called and there i re-size all my views. no the question is if i load a different layout to my page when my app is running (not on app start) will Page1_Resize event again called? i dont want to make the resize in the designer, i want to make it in my code like this (i know i can create a new sub or just call the page1_resize sub after layout is loaded but i dont want to do it twice, thats why i am asking...) thanx
Erel B4X founder Staff member Licensed User Longtime User Sep 1, 2015 #2 (Why do you want to stretch your layout? There are much better options available with anchors and the designer script). Page_Resize is called whenever the root panel is resized. You can uncheck the "Handler Resize Event" option in the layout file if you don't want it to be resized automatically. Upvote 0
(Why do you want to stretch your layout? There are much better options available with anchors and the designer script). Page_Resize is called whenever the root panel is resized. You can uncheck the "Handler Resize Event" option in the layout file if you don't want it to be resized automatically.
ilan Expert Licensed User Longtime User Sep 1, 2015 #3 Erel said: (Why do you want to stretch your layout? There are much better options available with anchors and the designer script). Page_Resize is called whenever the root panel is resized. You can uncheck the "Handler Resize Event" option in the layout file if you don't want it to be resized automatically. Click to expand... the reason i would like to stretch the layout is, i am making a game and i would like that all objects are in the same place and same size, doesnot matter what device you use. the same princip as in my libgdx games. like this i create levels in designer and just stretch all views on any screen size. when you say the page_resize will called only when the page is resized that means only at app start right? so when i load a new layout and would like to stretch all my views i need to call that sub again? by unchecking the "Handler Resize Event" option in the layout then the page_resize event will be called?? if i check "Handler Resize Event" then page_resize will not be called? Upvote 0
Erel said: (Why do you want to stretch your layout? There are much better options available with anchors and the designer script). Page_Resize is called whenever the root panel is resized. You can uncheck the "Handler Resize Event" option in the layout file if you don't want it to be resized automatically. Click to expand... the reason i would like to stretch the layout is, i am making a game and i would like that all objects are in the same place and same size, doesnot matter what device you use. the same princip as in my libgdx games. like this i create levels in designer and just stretch all views on any screen size. when you say the page_resize will called only when the page is resized that means only at app start right? so when i load a new layout and would like to stretch all my views i need to call that sub again? by unchecking the "Handler Resize Event" option in the layout then the page_resize event will be called?? if i check "Handler Resize Event" then page_resize will not be called?
Erel B4X founder Staff member Licensed User Longtime User Sep 2, 2015 #4 A game is indeed a good case for stretching the layout. Page_Resize will be called when the program starts as well as in some other cases: - Orientation change. - During an active phone call (the top bar becomes taller). It will not be called as a result of layout loading. Upvote 0
A game is indeed a good case for stretching the layout. Page_Resize will be called when the program starts as well as in some other cases: - Orientation change. - During an active phone call (the top bar becomes taller). It will not be called as a result of layout loading.
ilan Expert Licensed User Longtime User Sep 2, 2015 #5 Thank you for your help And making it clear for me... Upvote 0