Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

TopCommandArea Module

The TopCommandArea Module is used to set the parameters of the Top Command Area. The top command area is a region at the top of the screen designed to hold RhoElements controls such as the address bar or Go button to separate them from the rest of the user application.

Syntax

topCommandArea (Module) <META> Syntax

<META HTTP-Equiv="TopCommandArea" content="[parameter]">

TopCommandArea JavaScript Object Syntax:
By default the JavaScript Object 'topCommandArea' will exist on the current page and can be used to interact directly with the topCommandArea.
To Set topCommandArea parameters via JavaScript use the following syntax: topcommandarea.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. topCommandArea.visibility = 'value';
To set multiple EMML parameters / events on a single line use the following syntax: topcommandarea.setEMML("[Your EMML Tags]");

e.g. topCommandArea.setEMML("visibility:value");
TopCommandArea Ruby Object Syntax:
By default the Ruby Object 'TopCommandArea' will exist on the current page and can be used to interact directly with the TopCommandArea. All Methods, Parameters and Events are the same as JavaScript, however, notice 'TopCommandArea' needs to start with an uppercase letter. Another difference in Ruby is that methods do not end in '()'
To Set TopCommandArea parameters via Ruby use the following syntax: TopCommandArea.parameter = 'value' remembering to enclose your value in quotes where appropriate.

e.g. TopCommandArea.visibility = 'value'

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description Default Value
visibility:[Value] Visible, Hidden Sets the visibility of the top command area. Hidden.
height:[Value] Positive number, representing pixels Sets the height of the top command area Slightly greater than the height of a buttons default height, which depends on the screen resolution.
color:[Value] Color in the #RRGGBB format The color to set the top command area to. None. The default image is displayed by default.
image:[Value] URL Sets the image to be displayed on the top command area. See Remarks. Default image

Remarks

Default Positions

By default this control will be placed a the top of the screen. On Windows Mobile if the ‘FullScreen’ configuration setting is disabled the control will need to be moved, otherwise it will appear beneath the task bar.

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. (Not applicable to Enterprise Tablet)

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.

Requirements

RhoElements Version 1.0.0 or above
Supported Devices All supported 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 Top Command Area, sets the Height to 100 and background color to red

<META HTTP-Equiv="TopCommandArea" Content="Visibility:Visible">
<META HTTP-Equiv="TopCommandArea" Content="Height:100">
<META HTTP-Equiv="TopCommandArea" Content="Color:#FF0000">

The following example shows the Top Command Area, sets the height to 100 and displays image tca.gif on it (resizing the image if necessary)

<META HTTP-Equiv="TopCommandArea" Content="Height:100; Visibility:Visible; Image:url('http://myaddress/tca.gif')">
Back to Top