Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder 2 Preview » View Thread |
Messages 1 to 8 of 8 total |
EWB2 for Mobile. |
Tue, Apr 14 2015 10:49 PM | Permanent Link |
Steve Gill | Is anyone using EWB2 for mobile applications? If so, how do you cater for various screen sizes and orientations, and how do you detect the device?
Thanks. = Steve |
Wed, Apr 15 2015 4:14 AM | Permanent Link |
Matthew Jones | Steve Gill wrote:
> Is anyone using EWB2 for mobile applications? If so, how do you > cater for various screen sizes and orientations, and how do you > detect the device? Yes. From the advice posted by others before, this is what I do: In the main form create: Application.Desktop.OnResize := DesktopResized; Then procedure TfrmMain.DoDesktopResized; var nWidth : Integer; nHeight : Integer; begin try nWidth := Application.Desktop.Width; nHeight := Application.Desktop.Height; .... You can then use this to detect orientation, and adjust positions etc. Detecting devices is sort of easy. Android for example doesn't have the OnChange for text edits, so you can't enable a button when the text gets to 6 characters or more, for example. Just use the useragent to see what the client says it is: if Pos('Android', window.navigator.useragent) > 0 then keyCheckTimer.Enabled := True; Apart from that, I don't do any specific device detection as it pretty much handles all you'd want. Matthew |
Wed, Apr 15 2015 12:37 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< Is anyone using EWB2 for mobile applications? If so, how do you cater for various screen sizes and orientations, and how do you detect the device? >> You can detect the device using the Application.IsAndroid and/or Application.IsIOS properties. You don't really need to detect the screen resizing directly, rather you need to *respond* to the screen resizing by making your forms stretch to fill the available space. You should use the Stretch layout property to stretch controls *within* containers as they resize, and use the containers as "blocks" that either stretch or move below the container above it, depending upon the available size. I wish I could go into more detail, but I've got to finish this thing up, so I'm a little time-constrained right now. Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 15 2015 1:09 PM | Permanent Link |
Jim Gallagher | Quick question. I'm a new pre-order customer, so bear with me. In Mathew's post he references Application.Desktop. When I use that I get "Variable...Desktop does not exist". Is Desktop obsolete in version2? It is in the help, but I know that is a work in progress.
I just want to be sure I'm set up and configured correctly. -Jim |
Wed, Apr 15 2015 1:22 PM | Permanent Link |
Matthew Jones | Jim Gallagher wrote:
> Quick question. I'm a new pre-order customer, so bear with me. In > Mathew's post he references Application.Desktop. When I use that I > get "Variable...Desktop does not exist". Is Desktop obsolete in > version2? It is in the help, but I know that is a work in progress. Tim renamed it to be more sensible for version 2, and if you search back you will find it. The help is currently v1 help. |
Wed, Apr 15 2015 3:10 PM | Permanent Link |
Uli Becker | Jim,
it was renamed to TSurface. Uli |
Wed, Apr 15 2015 3:13 PM | Permanent Link |
Jim Gallagher | Uli Becker wrote:
>Jim, >it was renamed to TSurface. Thanks, Uli. |
Wed, Apr 15 2015 6:58 PM | Permanent Link |
Steve Gill | Thanks Tim and Matthew.
= Steve |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |