Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColor#2c3c4c

Web Application - Device Property

Device  Device type on which the application is executing

Member of of Web Application (PRIM_WEB.Application)

Data Type - Enumeration

Details

The Device property identifies the size of the device on which the application is running based on the pixel width. The

The DeviceChanged event will fire whenever there is a change of device e.g. a Browser is resized.

Allowed Values

Enum Value

Description

Desktop

Greater than 1200 pixels

Mobile

Less than 800 pixels

Tablet

Between 800 and 1199 pixels

Example

In this example, a different layout is applied based on the Device.

     Evtroutine Handling(#Sys_Web.DeviceChanged) 
Case (#Sys_Web.Device)
When (= Desktop)
#Com_owner.Layout <= #LayoutDesktop
When (= Mobile)
#Com_owner.Layout <= #LayoutMobile
When (= Tablet)
#Com_owner.Layout <= #LayoutTablet
Endcase
Endroutine


See also

All Component Classes

Technical Reference