ldb68 Posted September 29, 2015 Share Posted September 29, 2015 Is there a way in mobile mode to monitor the size of the form? The width of the form always returns the value of design time. thanks Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted September 29, 2015 Administrators Share Posted September 29, 2015 In mobile Form width is always equal to screen width which can be get from UniApplication.ScreenWidth. Link to comment Share on other sites More sharing options...
ldb68 Posted September 30, 2015 Author Share Posted September 30, 2015 In mobile Form width is always equal to screen width which can be get from UniApplication.ScreenWidth. I need to make a mobile program that should be accessible also via PC (Chrome etc.) without having to redo the desktop version. Then I need to know the width of the window to adapt some panel at screen size... Now I usa a JavaScript to detect the windows width in the login form.Save width to a cookie and then read the value in the main forms. It's the only way? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted September 30, 2015 Administrators Share Posted September 30, 2015 Have you tried this? UniApplication.ScreenWidth Link to comment Share on other sites More sharing options...
ldb68 Posted September 30, 2015 Author Share Posted September 30, 2015 Have you tried this? UniApplication.ScreenWidth Yes. It's ok the first time. Then if I change browser width on desktop (or rotate the tablet) the value doesn't change. Resize event also is not raised. Seems only recall a java script detect the change ... Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 1, 2015 Administrators Share Posted October 1, 2015 Will resolve in next build. Link to comment Share on other sites More sharing options...
Freeman35 Posted May 1, 2018 Share Posted May 1, 2018 Will resolve in next build. Which build? MEMO_1.Lines.Add( 'UniLoginFormShow UniApplication.ScreenWidth =' +UniApplication.ScreenWidth.ToString); MEMO_1.Lines.Add( 'UniLoginFormShow UniApplication.ScreenHeight =' +UniApplication.ScreenHeight.ToString); Thats still zero in build "1.10.0.1452" ( In desktop, I have no mobile ) Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 1, 2018 Administrators Share Posted May 1, 2018 Bug reported in this thread is related to Mobile Form. By design Login Form does not report screen size. For which purpose do you need screen size? BTW, you have reported to portal. We will try to find a workaround, but as I said, in LoginForm there is no ViewPort whih can report Screen sizes. Link to comment Share on other sites More sharing options...
Freeman35 Posted May 1, 2018 Share Posted May 1, 2018 Sorry about wrong thread my mistake, I saw this thread while searching, and saw mobile thread, but I can't deleted, so I added "( In desktop, I have no mobile )" I made test case for desktop, and add code about this. http://forums.unigui.com/index.php?/topic/10475-how-to-send-ajaxrequest-in-this-script/?p=54950 Link to comment Share on other sites More sharing options...
x11 Posted June 24, 2021 Share Posted June 24, 2021 On 10/1/2015 at 9:28 PM, Farshad Mohajeri said: Will resolve in next build. uniGUI ver 1549 s := UniSession.UniApplication.ScreenWidth.ToString + 'x' + UniSession.UniApplication.ScreenHeight.ToString; result "0x0" Link to comment Share on other sites More sharing options...
Recommended Posts