Jump to content

UniApplication.ScreenWidth


dionel1969

Recommended Posts

Hello !!!

 

I want to know when the value of property ScreenWidth of UniApplication is available??? The problem is that when the MainForm is created that value is still 0, but after show MainForm the value is 1024 as it must be.

Link to comment
Share on other sites

  • Administrators

Hello !!!

 

I want to know when the value of property ScreenWidth of UniApplication is available??? The problem is that when the MainForm is created that value is still 0, but after show MainForm the value is 1024 as it must be.

 

After Form OnScreenResize event.

 

In new build 882 it is only available if MainForm.MonitorBrowserResize is True.

Link to comment
Share on other sites

BTW, I wonder why you need screen width in OnCreate event. Advanced aligning and anchoring features of uniGUI should be more than enough for all sort of auto-sizing tasks.

 

In some applications, I use forms such as Delphi's main window with the main menu and a toolbar with basic choices. Then, I put the main window to align to the top, but in the case of the window on the web it does not work, which is why I was looking to know the width of the screen then put the same width with the value top to zero. Except to assign property "align" = alTop which other property I have to modify to do that???

Link to comment
Share on other sites

I see. We need to implement Align property for TUniForm in web mode. Logged #1083.

 

You can try page mode or use a maximized Form for instead.

 

Ok, If I would use Maximized Form, then the forms that are supposed to be child of the Main Form are displayed on the top (Z-Order) of MainForm and you have to move they for choosing options from Main Form. Using Delphi's MainForm Style the child forms will drawn under the MainForm (Y coordinate) and the Main Form is still visible with its options.

Link to comment
Share on other sites

After Form OnScreenResize event.

 

In new build 882 it is only available if MainForm.MonitorBrowserResize is True.

 

I set that property to true and in the FormScreenResize and now I have the screen width through aScreenWidth parameter.

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...