Jump to content

How To Design A Form That Will Fit Within A Mobile Phone's Screen?


Frederick

Recommended Posts

I write applications for the desktop but at times, I want to design a form (using desktop controls) that will fit within a mobile phone's screen, with vertical scrolling only.

What is the best way to do this? Are there examples I can look at?

--
Frederick
(UniGUI Complete - Professional Edition 1.90.0.1560)
 

Link to comment
Share on other sites

5 hours ago, rencarnacion said:

I suggest you radcore , please check it out

 

Thanks for your suggestion.

I would prefer re-design the form myself because

  1. the form is already complete and displays well in a desktop but difficult to see on a mobile phone
  2. I have only 3 days to finish the makeover
  3. I have no time to learn a third party product as extensive as Radcore

 

Link to comment
Share on other sites

Hello,

6 hours ago, Frederick said:
  • the form is already complete and displays well in a desktop but difficult to see on a mobile phone

Are you using client-side alignment?

\FMSoft\Framework\uniGUI\Demos\Desktop\Clientside Alignment - Layout VBox

 

Link to comment
Share on other sites

I have looked through the demos for layout management and I can't seem to find something that emulates the UniGUI forums when viewed in a web browser.

You will see that there is no horizontal scrolling and only vertical scrolling. As the web browser is resized, everything resizes itself to fit into the web browser's viewport.

How do I get my application to work like this?

layout.png

Link to comment
Share on other sites

  • 4 weeks later...

Hi Aggie85,

I used the following code and it seems to work.

MainForm.ClientEvents.ExtEvents -> 

function window.boxready(sender, width, height, eOpts)
{
    document.getElementsByTagName('head')[0].childNodes.forEach(function(el){if (el.tagName=="STYLE" && el.innerHTML=="body {overflow-y: hidden !important;}") el.innerHTML=""});
    Ext.getBody().setStyle('overflow', 'auto');
}
 

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