[RESOLVED] ToolStripTextBox Item With Label
You know when you right-click in an MS Access table and you see that context menu item with a "Filter For: [TextBox]"? (If you don't, it's basically a ToolStripTextBox item with a label infront of it.)
Anyway, I am looking to duplicate this. I have a pretty good idea how to do it, however, I wanted to see first of all if anyone knows of an already made inherited class that does this. Anyone know if any vbforum users may have created this?
Google hasn't really found anything good for me, so just thought I'd ask.
If not, I'm think of repositioning/resizing the TextBox then using the Drawing.Graphics.DrawString() to draw the label.
Re: ToolStripTextBox Item With Label
heres an example that adds a datetimepicker to a toolstrip. you can modify it easily to add a custom control that has a label and a textbox.
vb Code:
Dim _deadlineDateTimePicker As New DateTimePicker()
Dim _deadlineToolStripControlHost As New ToolStripControlHost(_deadlineDateTimePicker)
_deadlineDateTimePicker.Width = 140
ToolStrip1.SuspendLayout()
ToolStrip1.Items.Add(_deadlineToolStripControlHost)
'add other controls here
ToolStrip1.ResumeLayout()
Re: ToolStripTextBox Item With Label
Had no idea it was that easy... and here I was writing an inherited class. Thanks.