Jump to content


Photo

Mobile browser screen size


  • Please log in to reply
2 replies to this topic

#1 UliBru

UliBru

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 25 October 2012 - 01:28 PM

Is there a way to get information about the available screen size or panel of a browser? The size may change with different mobile phones and for sure with a desktop browser.
The information should be available during web form creation already to allow a layout adaption to the actual size.

BR
Uli
  • 0

#2 tnt23

tnt23

    Member

  • Members
  • PipPip
  • 26 posts

Posted 22 August 2013 - 03:25 PM

You can use

ClientEvents->ExtEvents->OnResize

function window.OnResize(sender, width, height)
{
   ajaxRequest(sender, 'screensize', ['width='+width,'height='+height] );
}

And do what ever you want in the form implementing OnAjaxEvent of the form

procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
begin
  if(EventName='screensize') Then Caption:=Params.Values['width'];
End;


  • 1

#3 logisticasoft

logisticasoft

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 207 posts

Posted 05 September 2013 - 03:40 AM

Hello,
1. When the user zooms in on the screen as I can capture the event?
 
I 2.How I can do  zoom by code ?
 
tks

  • 0

Carlos Ramirez

ramirez.carlos@yahoo.com





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users