RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMediaPlayer.OnClick Event

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.

Pascal
property OnClick: EMPNotify;
C++
__property EMPNotify OnClick;

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  
Stop  
btStop  
Stop  
Next  
btNext  
Next  
Prev  
btPrev  
Step  
btStep  
Step  
Back  
btBack  
Back  
Pause  
btPause  
Pause  
Eject  
btEject  
Eject  

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!