Working with Browser Application Windows

One of the Application window types that can be added to the TPD5 project is Browser. Use this application window to provide a fully functional web browser on the touch panel (FIG. 339):

FIG. 339 Browser Application Window displayed on a G5 touch panel

Setting a Default URL for Browser Application Windows

The App Parameters (General) property for Application windows provides the ability to have a Browser window open to a specific URL when it is displayed on the panel:

  1. Select Panel > Add Application window to open the Add Application window dialog.
  2. Select Browser, set the Name, Type, Position and Size options as desired, and click OK to add the Application window to the project.
  3. With the Browser Application window active in the Design View, select the App Parameters (General) property.
  4. Click the browse (...) button to access the Edit Parameter List dialog (FIG. 340):

FIG. 340 App Parameters property (General tab)

  1. Enter the desired default URI for this browser window in the "URI" text input field. Note that the URI must be an absolute URI (i.e. fully qualified, with scheme specified). If not, the browser window may not appear. As an example, to set the URI to open the AMX home page, enter the string "http://www.amx.com" (FIG. 341):

FIG. 341 App Parameters property (General tab)

NOTE: Consider naming each Browser application window that is set to open a specific URL with a descriptive name. For example, in this case the Application window could be named "Browser - AMX" to provide an easy way to differentiate it from other browser windows with specific default URIs.

  1. Click OK to save changes and close the Edit Parameter List dialog. The URI is now indicated in the App Parameters (General) property):

FIG. 342 App Parameters property (General tab)

  1. Create or select a button and set a Launch Action to open this browser window:
    1. In the Events tab of the Properties window, select an event (i.e. Button Press) and click the browse (...) button to open the

Edit Event Actions dialog.

    1. Click Add Launch Action, and select show.
    2. Open the drop-down menu of application windows that are in this project, in the Description column (FIG. 343):

FIG. 343 Edit Event Actions dialog (Launch Action p- show menu example)

    1. Select the Browser application window that was configured with a default URI (in this example the browser application window is named, "Browser - AMX").
    2. Click OK to save changes and close the Edit Event Actions dialog.
    3. At this point, when the project is loaded to the touch panel, a button press on the button configured in Step 7 will launch a Browser window, and it will open to the URI specified in Step 5 (in this example, "http:\www.amx.com").

Switching Between Desktop and Mobile Content

Many webpages have two modes for viewing: desktop and mobile. Desktop is optimized for a desktop PC, while mobile is optimized for viewing on a mobile device. By default, all Browser application windows are displayed on the touch panel as "mobile" content. Use options in the touch panel's on-board Settings menu to request "desktop" content for a specific URL, if desired:

  1. Press and hold the Settings/Sleep button on the G5 panel to access the Power off/Settings menu, and select Settings to access the Settings menu (FIG. 344):

FIG. 344 G5 Touch Panel - Power off/Settings menu

  1. Scroll down to the CONNECTIONS section, and select Browser.
  2. The panel will prompt you to enter a password in order to access the Browser page (default = 1988).
  3. In the Browser page, press Add a url to open the Enter URL window - use the on-screen keyboard to enter the URL of a website for which you want to request desktop (rather than mobile) content (FIG. 344):

FIG. 345 G5 Touch Panel - Settings > CONNECTIONS > Browser > Enter URL

Note that by default, when URLs are added here, the Use desktop content option is pre-selected.

  1. Press OK to save the URL and content setting.

At this point, the next time that the URL is accessed in a Browser application window, the touch panel will request desktop content.

NOTE: Refer to the Modero X Series® G5 Programming Guide for details on using the Settings application on G5 touch panels.

results matching ""

    No results matching ""