setDisplayLandscape()

Syntax:

[void] window.widget.setDisplayLandscape(void) 

or

[void] widget.setDisplayLandscape(void)

Description:

The setDisplayLandscape method changes the orientation of a widget's screen to the landscape mode.

Arguments:

This method does not take any arguments.

Return value:

This method does not return a value.

Remarks:

setDisplayLandscape() should be used only if a device supports screen orientation changes. To check this, use the isrotationsupported property.

This method only changes the orientation of the screen. It does not change the behavior of other UI components of a device such as the softkeys and their associated keys.

Example code:

if (widget.isrotationsupported)
   // change the screen orientation
   widget.setDisplayLandscape();