Windows Develop Bookmark and Share   
 index > Windows Forms General > StatusStrip Grip Size
 

StatusStrip Grip Size

I added a statusStrip to a form and the sizing grip is huge. Is there any way to make it the size of normal grips? (Internet Explorer, Visual Studio, etc...)

Just to clarify, the grip is 3 dots high and wide but seems to be actually 4 high and wide with the last ones invisible. On my form the 3 dots take up 3/4 of the bar while on mostthey take up about 3/8.

ScottyDoesKnow  Friday, September 25, 2009 7:01 PM
They are not dots, they are rectangles. Hardcoded to 2x2 size. There are 3, not 4. Take a closer look at them with a screen zooming tool like SysInternals' ZoomIt. If they are not 2x2 then the Graphics object passed to StatusStrip.OnPaintBackground() got messed up somehow.

The more likely explanation is that your status strip simply isn't tall enough. Change its Font property.
Hans Passant.
nobugz  Friday, September 25, 2009 8:39 PM
Yours looks entirely normal. There's no promise made that the grip looks exactly the same as the one used by Explorer. There is no Windows API that paints a grip. You can change it:

public partial class Form1 : Form {
public Form1() {
InitializeComponent();
statusStrip1.Renderer = new MyRenderer();
}
private class MyRenderer : ToolStripProfessionalRenderer {
protected override void OnRenderStatusStripSizingGrip(ToolStripRenderEventArgs e) {
// Draw your own...
}
}
}


Hans Passant.
nobugz  Monday, September 28, 2009 2:21 PM
They are not dots, they are rectangles. Hardcoded to 2x2 size. There are 3, not 4. Take a closer look at them with a screen zooming tool like SysInternals' ZoomIt. If they are not 2x2 then the Graphics object passed to StatusStrip.OnPaintBackground() got messed up somehow.

The more likely explanation is that your status strip simply isn't tall enough. Change its Font property.
Hans Passant.
nobugz  Friday, September 25, 2009 8:39 PM
Here's the difference between them. Mine is on the left, internet explorer, paint, visual studio, etc... is on the right. Changing font from 9 to 8 (minimum) didn't do anything, and I haven't changed font or height from the default.

http://i36.tinypic.com/iyn7ra.png
ScottyDoesKnow  Monday, September 28, 2009 1:58 PM
Yours looks entirely normal. There's no promise made that the grip looks exactly the same as the one used by Explorer. There is no Windows API that paints a grip. You can change it:

public partial class Form1 : Form {
public Form1() {
InitializeComponent();
statusStrip1.Renderer = new MyRenderer();
}
private class MyRenderer : ToolStripProfessionalRenderer {
protected override void OnRenderStatusStripSizingGrip(ToolStripRenderEventArgs e) {
// Draw your own...
}
}
}


Hans Passant.
nobugz  Monday, September 28, 2009 2:21 PM

You can use google to search for other answers

Custom Search

More Threads

• How to make form aware that Return key was pressed
• ListView items displaying bug
• Invoking User Control Event From Winforms
• Problem in Windows service in c#
• unable to create Typed-Dataset
• chart component (for data plot) in windows form applications! (chartspace)
• VB Help Plz
• How to get to the value of a datagrid column given the current cell value?
• TextBox : Best way to have Item_Code assigned to it.
• backgroundworker and UI controls