GrapeCity MultiRow Windows Forms Documentation
MinimumSize Property
Example 


Gets or sets the size that is the lower limit when resizing the Cell.
Syntax
<DefaultValueAttribute()>
<RefreshPropertiesAttribute(RefreshProperties.Repaint)>
<SRCategoryAttribute("Layout")>
<SRDescriptionAttribute("Indicates the size that is the lower limit when resizing the Cell.")>
Public Property MinimumSize As Size
Dim instance As Cell
Dim value As Size
 
instance.MinimumSize = value
 
value = instance.MinimumSize
[DefaultValue()]
[RefreshProperties(RefreshProperties.Repaint)]
[SRCategory("Layout")]
[SRDescription("Indicates the size that is the lower limit when resizing the Cell.")]
public Size MinimumSize {get; set;}

Property Value

A System.Drawing.Size value that represents the lower limit when resizing the Cell. The default value is Size.Empty.
Exceptions
ExceptionDescription
System.InvalidOperationExceptionSetting this value when the owner Template has been added to GcMultiRow.
Remarks

The value is Size.Empty, which means the MinimumSize does not take effect on Size.

Setting this property controls the lower limit of the UI resizing.

You can set the MinimumSize's width or height with the MaximumSize's width or height individually. For example, you can set the MinimumSize's width and the MaximumSize's width to limit only the horizontal direction.

Example
The following code example shows how to control a cell's maximum size and minimum size. This code example is part of a larger example provided for the GcMultiRow.AllowUserToResize class.
void setFirstCellMaxSizeAndMinSize_Click(object sender, EventArgs e)
        {
            Cell cell = this.gcMultiRow1.Template.Row[0];

            cell.MaximumSize = new Size(125, 0);
            cell.MinimumSize = new Size(60, 0);

            gcMultiRow1.Template = gcMultiRow1.Template;
            FillValue();
        }
Private Sub setFirstCellMaxSizeAndMinSize_Click(ByVal sender As Object, ByVal e As EventArgs) Handles makeFirstCellMaxSizeAndMinSize.Click
        Dim cell As Cell = Me.gcMultiRow1.Template.Row(0)

        cell.MaximumSize = New Size(125, 0)
        cell.MinimumSize = New Size(60, 0)

        gcMultiRow1.Template = gcMultiRow1.Template
        FillValue()
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Cell Class
Cell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.