toolstrip

How to disable the line under tool strip in winform c#?

好久不见. 提交于 2019-11-28 19:19:53
问题 this line ? 回答1: It's a bug in the "system" renderer, details in this bug report. Microsoft's response gives a very easy workaround: 1) Create a subclass of ToolStripSystemRenderer , overriding OnRenderToolStripBorder and making it a no-op: public class MySR : ToolStripSystemRenderer { public MySR() { } protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) { //base.OnRenderToolStripBorder(e); } } 2) Use that renderer for your toolstrip: toolStrip3.Renderer = new MySR();

Why am I getting a vertical line on toolstrip?

让人想犯罪 __ 提交于 2019-11-28 08:47:47
问题 I have two Windows Forms toolstrips that contain some controls on a form. However, for some strange reason, they contain a vertical line on the right hand side. I cannot find any property to remove them and I cannot find any other information on how to get rid of them online. Can anyone help? Thanks in advance. 回答1: It's the border of the toolstrip. Meant to give a clear separation between multiple adjacent tool strips. Changing its RenderMode property to System would be one way to get rid of

Change the BackColor of the ToolStripSeparator control

為{幸葍}努か 提交于 2019-11-28 01:33:47
Is it possible to change the BackColor of ToolStripSeparator control? There is a BackColor property in the designer, but it doesn't appear to be used - the color is always white. The default toolstrip renderer ignores the BackColor property and uses hard-coded colors. You can refer following link to use your own renderer to paint the separators the way you want them. http://social.msdn.microsoft.com/forums/en-US/winforms/thread/6cceab5b-7e06-40cf-82da-56cdcc57eb5d I see the question was asked 2 years ago, but I still can't find a simple and clear solution for this on the web. So... I've just

ToolStrip sometimes not responding to a mouse click

风流意气都作罢 提交于 2019-11-28 01:08:48
I have a .NET 2.0 WinForms application with a ToolStrip on my main form. Sometimes, the ToolStrip icons don't respond to the first mouse click, so I have to click the icon twice. It's just a standard ToolStrip with several icons and tooltip texts, I don't do anything special. Is this common? If the application window hasn’t got the focus, you have to click the ToolStrip button twice. The first click sets the focus to the window, the second raises the click event. This is (unfortunately) the default behaviour and it’s by design. Microsoft Word shows the same behaviour (even though the .NET

Change the BackColor of the ToolStripSeparator control

好久不见. 提交于 2019-11-26 21:59:03
问题 Is it possible to change the BackColor of ToolStripSeparator control? There is a BackColor property in the designer, but it doesn't appear to be used - the color is always white. 回答1: The default toolstrip renderer ignores the BackColor property and uses hard-coded colors. You can refer following link to use your own renderer to paint the separators the way you want them. http://social.msdn.microsoft.com/forums/en-US/winforms/thread/6cceab5b-7e06-40cf-82da-56cdcc57eb5d 回答2: I see the question