Ribbon - Get position from clicked button

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top