Questions tagged [toolstripcontrolhost]

25 questions
6
votes
1 answer

Adding a TrackBar in ToolStrip

I am trying to add a TrackBar in my ToolStrip. I have found this code somewhere on the net but I am not sure how to use it as it should be compiled maybe? Code /// /// Adds trackbar to toolstrip stuff /// [ …
Dumbo
  • 13,555
  • 54
  • 184
  • 288
3
votes
1 answer

Padding/ Size / Margin, when using ToolstripControlHost for a popup control

I'm using VB2008 Express. And I've been working on a "popup" to select a date range. The DateTimePicker isn't ideal because the purpose is to pick a date range, which will always be one full week, from Sunday through Saturday. The control works…
PaulOTron2000
  • 1,115
  • 1
  • 13
  • 20
3
votes
1 answer

ToolStrip with custom ToolStripControlHost makes tab order focus act weird

I'm experiencing some strange behavior. Let me try to explain, I stripped my code down to the bare minimum and I'm still having the problem. So first of all, I'm using VS2013 with .NET 4.0 and I'm on Windows 8.1. So I have a custom UserControl…
Adam Plocher
  • 13,994
  • 6
  • 46
  • 79
3
votes
0 answers

can't access to properties and events of my custom control inherited from ToolStripControlHost in designer

I'm looking to make a custom ContextMenu item which is composed of simply a FlowLayoutPanel containing a Label and a ComboBox. I want to be able to access the properties and events of my custom control at design-time in the designer of visual studio…
m0n0nk
  • 31
  • 2
2
votes
0 answers

How To Make ToolStripControlHost Highlight When Moused Over

I've created a custom menuitem using ToolStripControlHost but I wan't it to be highlighted when moused over like normal items: Notice how the item "None" is highlighed because the mouse cusor is over it. The last item is my custom control which…
troutinator
  • 1,160
  • 1
  • 7
  • 22
2
votes
0 answers

ToolStripControlHost stays always at top (C# window forms)

I built a form, in this form i built a ToolStripControlHost: ToolStripDropDown popup = new ToolStripDropDown(); popup.AutoClose = false; popup.Margin = Padding.Empty; popup.Padding = Padding.Empty; ToolStripControlHost host = new…
2
votes
1 answer

Show Image for ToolStripControlHost in drop down menu

I have a ToolStripSplitButton with various elements in dropdown list. One of them is a Trackbar enclosed in a ToolStripControlHost, called ToolStripTrackbarItem. It's code (I've got it from stackoverflow): using System; using…
Feri
  • 461
  • 4
  • 12
2
votes
0 answers

ToolStripControlHost selection on mouseover

I have a problem developing a custom menu item. The menu item is hosted in a ToolStripControlHost, the rest are just ToolStripMenuItems. What I want is that when the user hovers the mouse over the custom control, to be selected like an ordinary…
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

Why doesn't this ToolStripControlHost work?

I'm trying to emulate this answer but though this works: public class TrackBarMenuItem : ToolStripControlHost { TrackBar trackBar; public TrackBarMenuItem() : base(new TrackBar()) { trackBar = Control as TrackBar; …
ispiro
  • 26,556
  • 38
  • 136
  • 291
1
vote
0 answers

DateTimePicker in ToolStripControlHost cut off with different DPI settings

In the picture above there are two DateTimePicker controls in a Form. The upper DateTimePicker is inside a ToolStripControlHost, which is inside a ToolStrip control. When I have my Windows DPI settings set to the defaults, the two DateTimePickers…
Matthew
  • 6,356
  • 9
  • 47
  • 59
1
vote
1 answer

.NET Multiple ToolStripButtons in a single ContextMenuItem

I'm trying to create a ContextMenu where some items in the menu contain more than a single item. You could see it as trying to combine a ToolStrip and ContextMenuItem. I've tried using a ToolStripControlHost, but this creates problems with the…
1
vote
1 answer

ToolStripControlHost defaults to (0,0) location when adding to a ContextMenuStrip

This question builds off of this question. What I am doing is attempting to add a DateTimePicker control to a contextmenustrip using ToolStripControlHost. What is odd is the first time I select it in the contextmenu it shows at the location (0,0) …
1
vote
1 answer

How to render graphics on ToolStrip

I have created a custom user control that will display text and an indicator light to display the current running status of our service as shown in the form below. It works just fine on a form, but I want to put it on a StatusStrip control. I…
tdemay
  • 649
  • 8
  • 23
1
vote
1 answer

How to access values of a ToolStrip item that was added dynamically

Since only some standard items (textBox etc.) can be added to a ToolStrip control at design time in a Winform app, I've added a DateTimePicker control dynamically as follows but I'm not sure how to access the datetime value of the selected date in…
nam
  • 21,967
  • 37
  • 158
  • 332
1
2