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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...