A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Ribbon - Get position from clicked button



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 11th 07, 08:22 AM posted to microsoft.public.outlook.program_addins
Christian Havel
external usenet poster
 
Posts: 43
Default Ribbon - Get position from clicked button

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
Ads
  #2  
Old July 11th 07, 02:50 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Ribbon - Get position from clicked button

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Christian Havel" wrote in
message ...
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


  #3  
Old July 12th 07, 08:20 AM posted to microsoft.public.outlook.program_addins
Christian Havel
external usenet poster
 
Posts: 43
Default Ribbon - Get position from clicked button

Hi Ken,

thanks for your help!

What a pity. Hmm ....

Christian

"Ken Slovak - [MVP - Outlook]" wrote:

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Christian Havel" wrote in
message ...
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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2007 Click a Button on the Ribbon through Code [email protected] Add-ins for Outlook 5 December 14th 06 08:04 PM
Recipient addresses are removed from the To: box when send button clicked brodden Outlook - General Queries 1 August 23rd 06 02:11 PM
"Accept Proposal" button is dimmed/unable to be clicked on a calendar entry [email protected] Outlook - General Queries 0 July 20th 06 08:34 PM
Messages are deleted when clicked Gaven Outlook - Installation 2 May 25th 06 05:08 PM
Position of 'TODAY' Hildegarde Outlook - Calandaring 2 January 26th 06 04:23 PM


All times are GMT +1. The time now is 04:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.