Partager via


BUTTONELEMENT Element

[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 BUTTONELEMENT element defines a single button within a parent BUTTONGROUP element. It supports the following attributes. Predefined BUTTONELEMENT elements are also provided for convenience.

The BUTTONELEMENT element supports the following attributes.

Attribute Description
cursor Specifies or retrieves the value of the BUTTONELEMENT cursor that appears when the mouse is over the BUTTONELEMENT.
down Specifies or retrieves the up or down value of the BUTTONELEMENT.
downToolTip Specifies or retrieves the ToolTip text that appears when the mouse is over the BUTTONELEMENT and the BUTTONELEMENT is in the down state.
index Retrieves the index of the BUTTONELEMENT within the BUTTONGROUP.
mappingColor Specifies or retrieves the color key that identifies this BUTTONELEMENT in the BUTTONELEMENT group.
sticky Specifies or retrieves a value indicating whether the BUTTONELEMENT is sticky. When sticky, a BUTTONELEMENT will change states after being clicked and will remain in the new state until clicked again.
upToolTip Specifies or retrieves the ToolTip text that appears when the mouse is over the BUTTONELEMENT and the BUTTONELEMENT is in the up or active state.

 

The BUTTONELEMENT element supports the following method.

Method Description
click Calls the onclick event handler defined for the BUTTONELEMENT.

 

The BUTTONELEMENT element can implement the ambient event handlers. For more information, see Ambient Event Handlers.

The BUTTONELEMENT element supports the following ambient attributes: enabled and tabStop.

Predefined effects are normal EFFECTS elements with various common attribute settings specified by default. The following predefined BUTTONELEMENT elements are available.

Predefined BUTTONELEMENT Description
FFWDELEMENT A BUTTONELEMENT with a built in onclick event handler that calls player.controls.fastForward.
NEXTELEMENT A BUTTONELEMENT with a built in onclick event handler that calls player.controls.next.
PAUSEELEMENT A BUTTONELEMENT with a built in onclick event handler that calls player.controls.pause.
PLAYELEMENT A BUTTONELEMENT with a built in onclick event handler that calls player.controls.play.
PREVELEMENT A BUTTONELEMENT with a built in onclick event handler that calls player.controls.previous.
REWELEMENT A BUTTONELEMENT with a built in onclick event handler that calls player.controls.rewind.
STOPELEMENT A BUTTONELEMENT with a built in onclick event handler that calls player.controls.stop.

 

Skin Programming Reference