Right Click a AdvToolBar Main Menu Item

Is there a way to detect a right-click of an item displayed as a main menu item in a TAdvToolBar?

I found this on StackOverflow;
http://stackoverflow.com/questions/3788184/how-to-detect-tmenuitem-right-click
but it only works for SubItems of the main menu, and when that menu is displayed as a "normal" delphi menu.

Or, is there an alternative?

I was populating the main menu with drive letters, and now I would like to be able to right-click a drive to pop up additional information about it.  (left-clicking has a different action).

The root menu items correspond to TAdvToolBarButton instances on the TAdvToolBar.


You can access these via AdvToolBar.Controls[index] and you can assign an OnMouseDown event handler to handle the mouse right click:

  (AdvToolbar1.Controls[0] as TAdvToolBarButton).OnMouseDown := ...


Thanks.