Experiments for future HMGSCRIPT versions...

Moderator: Rathinagiri

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 3881
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 110 times

Experiments for future HMGSCRIPT versions...

Post by Roberto Lopez » Mon Dec 22, 2014 3:29 am

Hi All,

Instead of using pixels to define position and (in some cases) size of GUI objects, we could use relative units, as seen on this table (from w3schools: http://www.w3schools.com/cssref/css_units.asp):
Unit Description
em Relative to the font-size of the element (2em means 2 times the size of the current font) Try it
ex Relative to the x-height of the current font (rarely used) Try it
ch Relative to width of the "0" (zero)
rem Relative to font-size of the root element
vw Relative to 1% of the width of the viewport
vh Relative to 1% of the height of the viewport
vmin Relative to 1% of viewport's smaller dimension
vmax Relative to 1% of viewport's larger dimension
%
px pixels (1px = 1/96th of 1in)
Meaning that we could make our GUIs automatically adjust to screen sizes or similar criteria.

This, eventually, could allow us to use an unique interface for mobile and desktop (this idea must be tested and adjusted)

For this, the library should be modified to accept string as coordinates and sizes, in such way to work like that:

Code: Select all

	oMain = new Form( "HMGSCRIPT Main Demo (Desktop Style)", '90%' , '90%' );
To be tested...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
serge_girard
Posts: 1750
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 231 times
Been thanked: 45 times
Contact:

Post by serge_girard » Mon Dec 22, 2014 9:49 am

This would be great !

Serge

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest