tags:

views:

176

answers:

1

I would like to have a resize indication on a windows forms Form (the same resize-grip as when you have a status bar). I do not want to add a status bar to the form - that would break the design of the form.

The form can have various controls inside that are docked (Fill). I have not found any solution to this besides drawing the resize indication in lower right corner of every control, which is not very feasible.

Is this possible without adding a picture of the resize grip to every control that can be docked in the form?

+5  A: 

You don't have to have a status bar for sizing grip.

Set the SizeGripStyle property and then adjust padding of the from or the control which is located on the bottom right of your form, so that the controls are not drawn over the sizing grip.

form.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show
Eren Aygunes
Thanks, that was the property I missed
Marek
If you use this approach you can't use the Dock properties Fill, Bottom or Right directly on your form. Instead you have to use the Anchor properties on all controls or for some kind of container (TableLayoutPanel, SplitPanel, etc.) which are located directly on the form or the SizeGripper will disappear behind your control(s).
Oliver
You can actually do this from the designer view by using the properties dialog of the form. http://www.thejoyofcode.com/StatusBar_SizingGrip_in_WPF.aspx covers this while explaining how to do it for WPF
ChrisF
@Oliver: If the padding of the form is set properly, you can still use the Dock properties. The controls will not be drawn over the sizing grip in this case.
Eren Aygunes