Question

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 to its items a textbox. So when an exception occurs, the ToolStripSplitButton icon changes to indicate failure and if the user wants to know why, he clicks the ToolStripSplitButton which in turn will pop up the textbox.

When my form first loads, I change the properties of this textbox. I make it wider and longer & multiline.

ToolStripTextBox1.Multiline = True
ToolStripTextBox1.Width = 600
ToolStripTextBox1.Height = 300
ToolStripTextBox1.WordWrap = False

Only things is that this type of textbox will not accept scrollbars.

ToolStripTextBox1.ScrollBars = Windows.Forms.ScrollBars.Vertical

Seems like Microsoft has disabled its functionality?

Any thoughts on getting this box to scroll somehow?

Was it helpful?

Solution

You could try implementing your own version of the ToolStripTextBox as a custom user control and add it to the ToolStrip. The textbox on the user control would be a regular textbox which allows vertical scroll bars.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top