outlook value not retained : tab require?other Possibilities Retain value in combo box(CommandBarCom

M

Mangesh

I am in a fix, we are at the end of developing a plugin for outlook 2003 using .net 2.0 framework, but we noticed this strange phenomena,



1) We have a Command Bar, and there we have placed a combobox "Office.CommandBarComboBox" , we enter a value say "123" and when we click on some other place , it gets lost. But when we hit TAB,/ENTER key it is retained. How can we retain the value entered there after mouseclick ? On looking at various forums it appears that its not possible .. Is that so ? We have go get that functionality if at all its possible ? Can you give your final word on this aspect ?
 
S

sujit

Thanks for the response Ken. But there should be an alternative to this, I think. I need to implement it in my project anyhow. Is the below things possible ?

1) Can I use any other control in commandbar as an alternative to commandbarcombobox ? If yes what can I use ?

2) I think if somehow I override Kill_foucus event, I may get the value ? Am I right ? In normal windows form, I can easily attach this event, but I am not able similar event in Oultook. How can I attach a kill_focus event to COMMANDBARCOMBOBOX, using win32 API ?

I need this badly. Kindly help

Thanks
 
K

Ken Slovak - [MVP - Outlook]

1. There are no other controls you can use with the CommandBars interface
that does what you want. The only alternative there might be if you're using
Add-In Express, which I believe supports using various .NET controls on
command bars.

2. The controls don't fire any loss of focus events. If you want to try to
trap that using Windows message hooks you're on your own. I have no
information to provide for that, you'd have to research it and spend a lot
of time with Spy++ for that.

3. Design an alternative. For example a CommandBarPopup that has your list
as sub-menu items. Or a button that when clicked opens a form with a combo
or other control on it.

You can't always get what you want...
 

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