THEME.openViewRelative

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The openViewRelative method opens a VIEW in a new window at a specified initial position relative to the upper-left corner of the skin.

        theme.openView(view, left, top)

Parameters

view

A String specifying the id of the VIEW to open.

left

A Number (long) specifying the initial distance in pixels of the left border of the VIEW from the left border of the skin. A negative value indicates an initial position to the left of the skin border.

top

A Number (long) specifying the initial position of the top border of the VIEW relative to the top border of the skin. A negative values indicates an initial position above the skin border.

Return Value

This method does not return a value.

Remarks

The position specified for the VIEW is used the first time this method is called, after which the user can drag the VIEW to another location. The new position is saved, and on subsequent calls, the most recent position is used.

Examples

<THEME>
  <VIEW>
    <TEXT value="open" 
        onclick="jscript:theme.openViewRelative('newView', 50, 50)"/>
    <TEXT top="30" value="close" 
        onclick="jscript:theme.closeView('newView')"/>
  </VIEW>
  <VIEW id="newView"/>
</THEME>

Requirements

Requirement Value
Version
Windows Media Player 9 Series or later

See also

THEME Element

THEME.closeView

THEME.openView