Click or drag to resize

PropertyGridExtensionsAdjustLabelRatio Method

Adjusts a property grid's label ratio

Namespace: GSF.Windows.Forms
Assembly: GSF.Windows (in GSF.Windows.dll) Version: 2.4.218-beta
Syntax
public static void AdjustLabelRatio(
	this PropertyGrid grid,
	double ratio
)
View Source

Parameters

grid  PropertyGrid
Property grid to adjust
ratio  Double
Ratio to use use for label column

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PropertyGrid. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

Smaller ratios (e.g., 1.75) produce a wider label column.

This function only has an effect on property grids when their Visible property is set to True. To use this on an initially hidden property grid - set the property grid's Visible property to True at design time, call this function during form load, then set the Visible property to False.

This function was written to work with the .NET 2.0 PropertyGrid control. Note that reflection is used to set private properties of the property grid and as a result this function may not work with future versions of the .NET property grid.

See Also