![]() ![]() ![]() I set a form property that allows me to determine which child form to load. In that method you can choose what to do with that resize event. Print("Page Resize Event - new size : "+str(page_size_px)+" px") Checking an element for change in its width or height can be done with the ResizeObserver Javascript object. if you use javascript, you can trigger window resize event by using javascript dispatchEvent() function. Then create this method in your form : def page_resize_event(self,page_size_px): You can simply use the addEventListener() method to register an event handler to listen for the browser window resize event, such as window.addEventListener(. It's the answer under the accepted one.Īnvil.call($('#main-page-id'), "page_resize_event", calculatePageWidth()) This resizing pseudo-throttling routine was got from here : Required to send you an initial page size. In your standard-page.html which is provided when you choose “Standard Page” as your form, put the following at the end : ![]() I am even less of a JS expert than I am Python … Please correct or better the code if you can/want to. I’ve only tried this in a SPA (ie the main form remains open throughout) using the Material design. I often want to show completely different forms if the user’s screen is below a certain size (eg mobile), as I am completely unable to create multi-device forms that resize well and look good. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |