Questions tagged [toolstripdropdown]

75 questions
2
votes
3 answers

ToolStripCombobox displays at the top left corner of the screen when DropDownStyle is Simple

I have a ToolStripCombobox that when I set its DropDownStyle to Simple. The first time which I open the menu, it displays at the top left corner of the screen. However, when I select the same item for the second time, it displays in the correct…
Pucho
  • 370
  • 2
  • 20
2
votes
2 answers

How to add two ToolStripComboBox and Separator Horizontally to one ToolStripDropMenuItem?

I think that this should be simple to do. But I haven't seen it. I'd like to do something like: DropDown -> DropDownItem1 [ComboBox1 [|] ComboBox2], DropDownItem2 [...], DropDownItem3 [...]; I'm using ToolStripDropDownButton in a ToolStrip. I'm…
2
votes
1 answer

Cannot find the ToolStripDropDownButton in design toolbox

I am making a form and would like to use a ToolStripDropDownButton (basically a button with an arrow pointing down from where u can select an item): as found in the Microsoft website but I cannot seem to find it in the form[design] toolbox. I am…
metaplexer
  • 55
  • 6
2
votes
2 answers

ListControl.DataSource in ToolStipControlHost not function

I use a ToolStripControlHost to wrap a ListBox control for adding it into a ToolStripDropDown, but found items I assign to ListBox.DataSource not shown up, and ComboBox.DataSource not work as well, I don't understand why ListContorl.DataSource not…
2
votes
1 answer

Show ToolStripDropDown correctly

I want to show ToolStripDropDown in a way as ComboBoxs dropdown is shown (or for example DateTimePickers dropdown). So I wrote this code in my Form: private readonly ToolStripDropDown _toolStripDropDown = new ToolStripDropDown { TopLevel =…
Artholl
  • 1,291
  • 1
  • 19
  • 38
2
votes
6 answers

How to find toolstripmenuItem with name

I have set visible property of my menuStrip1 items to false as foreach (ToolStripMenuItem itm in menuStrip1.Items) { itm.Visible = false; } Now I know the Names of toolStripMenuItem and dropDownItem of the menustrip1. How to can I activate the…
Learner
  • 1,286
  • 6
  • 34
  • 57
2
votes
1 answer

Troubles with updating ToolstripDropdownButton after window loses focus

Let me start from a simple example to reproduce my problem: Create WinForms project. Drop a ToolStrip on it. Make a ToolstripDropdownButton in it (with no children). Add a click event-handler to the button, with something like…
Antenka
  • 1,519
  • 2
  • 19
  • 29
2
votes
1 answer

ToolStripTextBox1.ScrollBars = Windows.Forms.ScrollBars.Vertical

Quick question. Using VS2012, .net framework 4.5, VB on win7 x64. Trying to create a message holder in my status bar, to display long exception messages when something goes wrong in my app. I had an idea of using a ToolStripSplitButton and adding…
2
votes
1 answer

Add object other than string to ToolStripDropDownButton DropDownItem

It's easy to add strings to a ToolStripDropDownButton as a new DropDownItem. What I need is to add a custom object to the DropDownItems so that I can assign a key/value like object to the DropDownItem. How may I achieve this?
Daniel
  • 1,391
  • 2
  • 19
  • 40
2
votes
1 answer

How to get a string from ToolStripDropDownButton item clicked?

btn1 is ToolStripDropDownButton How can I say this private void btn1_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) { MessageBox.Show(btn1.CurrentItem.Text.ToString()); // CurrentItem = item clicked. }
Alegro
  • 7,534
  • 17
  • 53
  • 74
1
vote
1 answer

Adding a right-click Context Menu on a ToolStripMenuItem, without closing the Menu

My application has a menu at the top. The first item in the menu (File) has the usual New, Open..., Save, Save As... as well as Open Recent. This last one is a ToolStripDropDown showing a most-recently-used list of filenames. I would like to add a…
erict
  • 1,394
  • 2
  • 14
  • 28
1
vote
0 answers

How do I set a submenu DropDownItem to CHECKED without Clicking on it?

I've created a contextmenu (ie displays on a right mouse click) at design time with 2 menu items. I'm subsequently using code to add submenu items eg. For the 2nd menu item I add the following 4 submenu items. (contextMenuStrip1.Items[1] as…
Doug
  • 113
  • 1
  • 5
1
vote
1 answer

Debugger Visualizer Winform ToolStripDropDownMenu ComboBox only shows items when first shown

I have a Visual Studio debugger visualizer project, and when I add a ToolStripComboBox to a ToolStripDropDownMenu, the combobox's items only appear the first time the form is shown. Like this: The most basic version of the winform code showing the…
Steve Wilkes
  • 7,085
  • 3
  • 29
  • 32
1
vote
1 answer

ToolStripDropDown catches MouseeDown before underlying control

I have created my own ComboBox-like control where the dropdown part contains a tree. I have seen those solutions using an ordinary ComboBox and overwriting the WndProc, but there was always some odd behavior despite lots and lots of code. So I…
oliver
  • 2,771
  • 15
  • 32
1
vote
1 answer

Listbox DataSource not working when added to a ToolStripDropDown

I have been struggling all day with this problem, although I couldn't find a solution. I apologize for the long post, I tried to be concise and clear. This is what works: I create a Form and inside its class I create a ListBox dynamically and set…
Ricardo González
  • 1,385
  • 10
  • 19