Vcl.MPlayer.TMediaPlayer.OnClick

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnClick: EMPNotify read FOnClick write FOnClick;

C++

__property EMPNotify OnClick = {read=FOnClick, write=FOnClick};

Properties

Type Visibility Source Unit Parent
event published
Vcl.MPlayer.pas
Vcl.MPlayer.hpp
Vcl.MPlayer TMediaPlayer

Description

Occurs when the user presses and releases the mouse button while the mouse pointer is over one of the control buttons, or when the user presses Spacebar while the media player control has focus.

When the media player control has focus and the Spacebar is pressed, the user can use the Left Arrow or Right Arrow keys to select which control button to click.

The EMPNotify type is a method pointer that is called when an OnClick event for a TMediaPlayer components occurs. The Button argument can be one of the following values: btBack, btEject, btNext, btPause, btPlay, btPrev, btRecord, btStep, or btStop.

The default value of the event handler's DoDefault argument is true. If DoDefault is true, the media player control calls the method that corresponds to the clicked button. For example, if the user clicks the Play button (btPlay), the Play method is called.

If DoDefault is false, the user must write code that executes when a media player control button is clicked in the OnClick event handler. The following table lists the default methods corresponding to the media player control buttons:



Control button Button value Method called

Play

btPlay

Play

Record

btRecord

StartRecording

Stop

btStop

Stop

Next

btNext

Next

Prev

btPrev

Previous

Step

btStep

Step

Back

btBack

Back

Pause

btPause

Pause

Eject

btEject

Eject



See Also