473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ToolStripComboBox.DroppedDown

Hello.

I am trying to set ToolStripComboBox.DroppedDown inside of the Leave
event and it does not work:

public class MyToolStripComboBox : ToolStripComboBox
{
public MyToolStripComboBox()
{
Leave += new EventHandler(ExtendedToolStripComboBox_Leave);
}

protected void MyToolStripComboBox_Leave(object sender,
EventArgs e)
{
if (<SomeCondition>)
{
DroppedDown = true;
}
}
}

The drop down list actually drops down but it is inmediatly rolled up.
I have found the following workaround:

public class MyToolStripComboBox : ToolStripComboBox
{
public MyToolStripComboBox()
{
Leave += new EventHandler(ExtendedToolStripComboBox_Leave);
}

protected void MyToolStripComboBox_Leave(object sender,
EventArgs e)
{
if (<SomeCondition>)
{
Parent.BeginInvoke(new MethodInvoker(SetDroppedDown),
null);
}
}

private void SetDroppedDown()
{
DroppedDown = true;
}
}

And it works. I suppose this is a bug inside the ToolStripComboBox
control. I just want to write about it so if someone finds the same
problem she will find something on the internet. Also, if someone from
Microsoft would like to leave a comment, it will be appreciated.

Thank you.

Jan 8 '07 #1
0 1211

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Chandra | last post by:
Hello Sir, This is Chandra and Working as Software Engineer. I got a really weird problem with ComboBoxes. I have set the ComboBox DroppedDown Property to true. Now the actual problem is...
0
by: Job Lot | last post by:
How can i bind ToolStripComboBox to a DataTable? There is no DataSource, DisplayMember & ValueMemeber property? Thanks
3
by: bds | last post by:
Is there any way to databind a ToolStripComboBox? I have a form where I'd like a databound combobox to be the parameter selection of a DataGridView. This combobox comes from a table with your...
5
by: Manuel | last post by:
How can I add an item to a ToolStripComboBox and specify a DisplayMember and a ValueMember?
0
by: GSL | last post by:
Our application is written in VS/VB 2005. We have several toolstripcomboboxes. The tscbx's dont close until you click on something else outside the tscbx. We initially developed the app in VS/VB...
1
by: Jim Hubbard | last post by:
Why isn't the Keypress event of the System.Windows.Form.ToolStripComboBox triggered by hitting the Enter key? I cannot trap Keys.Enter or Keys.Return in the Keypress event.
2
by: Jason Richmeier | last post by:
Perhaps it is because it is the end of the day and my eyes are tired of looking at code but I cannot seem to figure out what I am doing wrong and what I can do (if anything) to fix it. On a...
2
by: MyndPhlyp | last post by:
I would like a small DropDownList style ComboBox on the ToolStrip but it seems VB 2005 is not going to let me set the .Width property to a value less than 75 in Designer mode. Setting it...
2
by: Paul | last post by:
VB.NET 2003. I am loading a dialog box form with a ComboBox. I'm using a DropDownStyle of "DropDown" rather than "DropDownList". I want them to be able to type in it fill in as they type. The...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.