Jump to content

mobile form size


ldb68

Recommended Posts

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

 

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

  • 2 years later...

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

  • Administrators

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

  • 3 years later...
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

×
×
  • Create New...