Overview
The ZoomTextButton Module is used to set the parameters of the Zoom Text Button, which cycles the font size in the browser in ascending order (from smallest to largest).
Syntax
zoomTextButton (Module) <META> Syntax |
---|
<META HTTP-Equiv="ZoomTextButton" content="[parameter]"> |
ZoomTextButton JavaScript Object Syntax: |
---|
By default the JavaScript Object 'zoomTextButton' will exist on the current page and can be used to interact directly with the zoomTextButton. |
To Set zoomTextButton parameters via JavaScript use the following syntax: zoomtextbutton.parameter = 'value'; remembering to enclose your value in quotes where appropriate.
e.g. zoomTextButton.left = 'value'; |
To set multiple EMML parameters / events on a single line use the following syntax: zoomtextbutton.setEMML("[Your EMML Tags]");
e.g. zoomTextButton.setEMML("left:value"); |
Parameters
Items listed in this section indicate parameters, or attributes which can be set.
Name | Possible Values | Description | Default Value |
---|---|---|---|
left:[Value] | Positive number, representing pixels | Sets the X position of the ZoomText button in pixels. | Bottom right of the screen |
top:[Value] | Positive number, representing pixels | Sets the Y position of the ZoomText button in pixels. | Bottom right of the screen |
height:[Value] | Positive number, representing pixels | Sets the height of the ZoomText button. | Dependant on screen resolution |
width:[Value] | Positive number, representing pixels | Sets the width of the ZoomText button. | Dependant on screen resolution |
imageUp:[Value] | URL | Sets the image to be displayed when the ZoomText Button is in the up state. See Remarks. | Default image |
imageDown:[Value] | URL | Sets the image to be displayed when the ZoomText Button is in the down state. See Remarks. | Default image |
visibility:[Value] | visible, hidden | Sets the visibility of the ZoomText button. | Hidden. |
Remarks
Use of Images on Buttons.
Images can be specified as local to the device or on an HTTP / FTP server, just specify the required protocol as part of your URL (file://, HTTP:// and FTP://). Image will be scaled to the size of the button. JPEG and GIF images are only supported on WM devices. Both CE and WM support BMP files.
Switching to Other Applications
All controls are designed to be shown on top of RhoElements. If you require to switch to an application other than RhoElements you should minimize RhoElements to ensure the buttons do not remain shown.
Screen Orientation
When the screen orientation changes, either using the ScreenOrientation tag or by rotating a device with hardware support, the command areas will automatically move and resize to fit the new layout. However the buttons themselves are not moved and in some cases this may result in them being off the screen or not in the expected position. If so they must be moved manually by detecting the ScreenOrientationEvent.
Use in Production
This API is designed for debugging your application only and should not be used in production
Requirements
RhoElements Version | 1.0.0 or above |
---|---|
Supported Devices | All supported touch devices. |
Minimum Requirements | None. |
Persistence | Persistent - Changes to this module will persist when navigating to a new page. |
HTML/JavaScript Examples
The following example shows the ZoomText button, sets its left and top coordinates to 50 pixels, and its height and width to 20 pixels.
<META HTTP-Equiv="ZoomTextButton" Content="Visibility:Visible">
<META HTTP-Equiv="ZoomTextButton" Content="Left:50">
<META HTTP-Equiv="ZoomTextButton" Content="Top:50">
<META HTTP-Equiv="ZoomTextButton" Content="Height:20">
<META HTTP-Equiv="ZoomTextButton" Content="Width:20">
The following example shows the ZoomText button and displays the zoomText_up.gif / zoomText_down.gif images on it (resizing the images if necessary).
<META HTTP-Equiv="ZoomTextButton" Content="ImageUp:url('http://myaddress/zoomText_up.gif'); ImageDown:url('http://myaddress.zoomText_down.gif'); Visibility:Visible">