Displaying web pages in your app
If you need to display a live web page in your mobile app, then this recipe is for you. In this recipe, you will learn how to create a display area in your app, retrieve web data, and display that data.
How to do it...
Follow these steps to display web pages in your app:
Create a new main stack.
Select the stack's card and drag an image area to display the web information.
Select the image and then select the Group icon on the toolbar to make the image a group.
Select the group and set the following properties:
Name:
Browser
Width:
312
Height:
390
Location:
160
,225
At the card level, enter the following code:
local browserID
Create a
preOpenCard
handler with the following code:on preOpenCard mobileControlCreate "browser" put the result into browserID mobileControlSet browserID, "visible", \ "true" mobileControlSet browserID, "url", \ "http://www.packtpub.com" end preOpenCard
Note
The
preOpenCard
message is sent to...