CommandBarComboBox on inspector toolbar

G

Guest

I have created a commandbarcombox on an inspector commandbar like this:

MO.CommandBarComboBox ctl = (MO.CommandBarComboBox)ctls.Add(
MO.MsoControlType.msoControlEdit,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
true);
ctl.Caption = "txt";
ctl.Style = MO.MsoComboStyle.msoComboNormal;
ctl.Visible = true;
ctl.Text = "Some Value";

The control shows up on the toolbar but there is a usability issue under
Office XP and 2003. 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. Why
is this and how do I make this control behave like a textbox should?

Thank you,

Benjamin Strum
ThinkTron Corporation
 
G

Guest

No, I have not gotten any resolution to it. I know it has something to do
with the focus. I had spent a ilttle time trying to find a way to keep the
focus on the toolbar after the user enters some data but I can't find any
event handlers for this.

Let me know if you find out anything.

Thanks,

-Ben
 
G

Guest

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-when-keyboard-TAB 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 ?


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;



Thanks
 

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