N
newToOutlookProgramming
CommandBarComboBox on inspector toolbar (ol2003 + vsto 2005 se + windowsXP)
-----------------------------------------------------------------------------------------------
I have created a commandbarcombox on an inspector commandbar via a OL addin .
I am facing this issue of loose-value-on-mouse-click v/s
retain-value-on-keyboard-TABOUT for the text entered in that
commandbarcombox .
(Q1) Any body any ideas on how to resolve this ?
(Q2) Is this a Microsoft bug or am I doing anything wrong ?
relevant code is :
using Office = Microsoft.Office.Core;
..
..
..
MyCmdBarCbx = (Office.CommandBarComboBox)MyUICommandBar.Controls.Add(
Office.MsoControlType.msoControlEdit,
_MyMissing,
_MyMissing,
cmdBarControlPosition,
1);
MyCmdBarCbx.Width = 120;
MyCmdBarCbx.Tag = MyEntryId + MyRandomNo + MyStrings;
Office._CommandBarComboBoxEvents_ChangeEventHandler MyCmdBarCbxHandler =
new Office._CommandBarComboBoxEvents_ChangeEventHandler(MyCmdBarCbx_Change);
MyCmdBarCbx.Change += MyCmdBarCbxHandler;
The control shows up fine on the toolbar.
After the user enters text in this control, it reverts back to the original
text if the user clicks somewhere else (such as the message body). Hitting
tab, however, preserves the newly entered text.
For the first time when the original text is null, then on-clicking anywhere
text reverts to null.
Why is this and how do I make this control behave like a textbox should?
Thanks a lot
-----------------------------------------------------------------------------------------------
I have created a commandbarcombox on an inspector commandbar via a OL addin .
I am facing this issue of loose-value-on-mouse-click v/s
retain-value-on-keyboard-TABOUT for the text entered in that
commandbarcombox .
(Q1) Any body any ideas on how to resolve this ?
(Q2) Is this a Microsoft bug or am I doing anything wrong ?
relevant code is :
using Office = Microsoft.Office.Core;
..
..
..
MyCmdBarCbx = (Office.CommandBarComboBox)MyUICommandBar.Controls.Add(
Office.MsoControlType.msoControlEdit,
_MyMissing,
_MyMissing,
cmdBarControlPosition,
1);
MyCmdBarCbx.Width = 120;
MyCmdBarCbx.Tag = MyEntryId + MyRandomNo + MyStrings;
Office._CommandBarComboBoxEvents_ChangeEventHandler MyCmdBarCbxHandler =
new Office._CommandBarComboBoxEvents_ChangeEventHandler(MyCmdBarCbx_Change);
MyCmdBarCbx.Change += MyCmdBarCbxHandler;
The control shows up fine on the toolbar.
After the user enters text in this control, it reverts back to the original
text if the user clicks somewhere else (such as the message body). Hitting
tab, however, preserves the newly entered text.
For the first time when the original text is null, then on-clicking anywhere
text reverts to null.
Why is this and how do I make this control behave like a textbox should?
Thanks a lot