Ribbon - Get position from clicked button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I receive the click-event from my ribbon buttons. Now I have to get their
position to show a dialog beside them.

I found that I can call the properties Width and Height on the
ribbonControl. I get allways the same values independent if I move the
inspector. Any idea how I can get the position from the clicked Ribbon button?

'Callback method
Public Function cmdCommonRibbonBttn(ByVal control As IRibbonControl)
'Get the values
ribbonCtrl.Context.Width
ribbonCtrl.Context.Height
 
control.Context is the Inspector, so you're getting the width and height of
the Inspector, which wouldn't change unless the user resized the Inspector.
The Top and Left properties would give you approximate screen positions, but
only of the Inspector.
 
Back
Top