Difference between revisions of "ISDBMenuItemEvents::OnClick"

From MediaMonkey Wiki
Jump to: navigation, search
 
(added example)
 
Line 1: Line 1:
{{MethodDeclaration|SDBMenuItem|ISDBMenuItemEvents|Sub OnClick(Control As Object)}}
+
{{MethodDeclaration|SDBMenuItem|ISDBMenuItemEvents|Sub OnClick(MenuItem As [[SDBMenuItem]])}}
  
 
===Parameters===
 
===Parameters===
  
 
{{MethodParameters  
 
{{MethodParameters  
  |Control |Object |}}
+
  |MenuItem|[[SDBMenuItem]]|Clicked menu item.}}
  
 
===Event description===
 
===Event description===
  
 +
Event is called when user clicks on given toolbar/menu item. Event handler receives clicked menu item as the argument.
 +
 +
===Example code===                   
 +
<source lang="vb">
 +
Sub OnClickHandler(MenuItem)
 +
  ' Event code goes here...
 +
End Sub
 +
 +
' Assume we have already initialized the MenuItem variable
 +
Script.RegisterEvent MenuItem, "OnClick", "OnClickHandler"
 +
</source>
  
 
[[Category:Scripting|{{PAGENAME}}]]
 
[[Category:Scripting|{{PAGENAME}}]]

Latest revision as of 15:12, 23 April 2013

CoClass SDBMenuItem, Interface ISDBMenuItemEvents

Sub OnClick(MenuItem As SDBMenuItem)


Parameters

Name Type Description
MenuItem SDBMenuItem Clicked menu item.


Event description

Event is called when user clicks on given toolbar/menu item. Event handler receives clicked menu item as the argument.

Example code

Sub OnClickHandler(MenuItem)
  ' Event code goes here...
End Sub

' Assume we have already initialized the MenuItem variable
Script.RegisterEvent MenuItem, "OnClick", "OnClickHandler"