Jump to content

MainForm resizing to screen width / responsiveness


Dao

Recommended Posts

Hello!

I'm new to Unigui and despite reading similar topics, I can't manage to get it work the way I want.
I currently have a simple web app: my main form consist of two panels (one with 2 buttons and a date picker) and a string grid. The WindowState of MainForm is set to wsMaximized.
First opening of the browser does work: the app is browser-window sized. But if I change the size of the window with the mouse, or use minimize/maximize window button, it stays the size it was first opened.
The questions are:

1. How do I manage to have my app ALWAYS resized to the screen size? Is it managed by Delphi code (onResize) or do I need to go into the JS (window.resize)? Or both?
I've seen a few sample codes here and there but I don't understand where they should be implemented and how they relate to each other, if at all..
1b. Could the only use of the Layout (attribs/config) options work for this ?

2. What about the responsiveness of elements inside the form? In other languages, that's where I use media queries within the CSS but it doesn't work here.
2b. Can you actually change the CSS of existing unigui components ? I've tried to do so in the ServerModule -> CustomCSS but without success.

I'd really appreciate any help you can provide with this. Please let me know if something is unclear.
Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...