locked
SizeGripStyle.Auto behaviour RRS feed

  • Question

  •    Can someone explain the behaviour of SizeGripStyle.Auto which is a
    value for the Form.SizeGripStyle property?

    [Note: SizeGrip is the triangular section shown in lower right hand corner of forms to indicate it can be resized]

    According to the MSDN doc it just says "The sizing grip is automatically displayed when needed." What are those "When needed?" situations.

    In the doc for Form.SizeGripStyle it says "You can set this property to display the sizing grip or have it automatically displayed based on the setting of the FormBorderStyle property"
    But setting the FormBorderStyle property to either Sizable or SizableToolWindow doesnt bring up the SizeGrip on the form. How is the FormBorderStyle related to the SizeGripStyle.Auto property.?
    Thursday, November 17, 2005 10:03 AM

Answers

  • When SizeGripSize is set to Auto, the size grip is only shown when the form is sizable (ie has FormBorderStyle set to Sizable or SizableToolWindow) and is shown as a dialog via Form.ShowDialog(). With SizeGripSize.Show, it is always shown as long as the form is sizable.
    Thursday, November 17, 2005 10:23 AM

All replies

  • When SizeGripSize is set to Auto, the size grip is only shown when the form is sizable (ie has FormBorderStyle set to Sizable or SizableToolWindow) and is shown as a dialog via Form.ShowDialog(). With SizeGripSize.Show, it is always shown as long as the form is sizable.
    Thursday, November 17, 2005 10:23 AM
  •     Thanks for yor reply. You are correct. Do you know why it has been done this way? i.e show SizingGrip for only DialogForms by default. Shouldn't it show for ordinary forms also if it is resizable?
    Thursday, November 17, 2005 10:35 AM
  • I think it comes down to the fact that most non-modal forms (ie those shown via Form.Show()) are assumed to be resizable by the user and therefore, do they do not need a indication (via the SizeGrip) that they can be resized.

    In contrast, dialogs typically are not resizable, Therefore, in the odd occasion that they are (although it's more common these days), there needs to be sort of indication to the user that they can be resized.

    That's what I think anyway.
    Thursday, November 17, 2005 10:52 AM
  • Well it doesnt work for MDI child windows.

    Setting the style to show doesnt work either.A MDI child window cant show its sizegrip if the parent is maximized.When the parent is not maximized the child shows the grip but its not

    functional.

    Someone else has the same problem here:

    http://www.thescripts.com/forum/thread393708.html

    Is this a bug or am I doing something wrong.I can post code if needed.

    Sunday, April 1, 2007 7:36 AM
  • I'm showing a SizeGrip on my maximized MDI child just fine. Check to ensure that you don't have a docked control obscuring the SizeGrip - if so set the backcolor of the control to transparent.

    Friday, June 5, 2009 2:31 PM