|
PropertyGridExtensionsAdjustLabelRatio Method
|
Adjusts a property grid's label ratio
Namespace: GSF.Windows.FormsAssembly: GSF.Windows (in GSF.Windows.dll) Version: 2.4.230-beta
Syntaxpublic static void AdjustLabelRatio(
this PropertyGrid grid,
double ratio
)
<ExtensionAttribute>
Public Shared Sub AdjustLabelRatio (
grid As PropertyGrid,
ratio As Double
)
public:
[ExtensionAttribute]
static void AdjustLabelRatio(
PropertyGrid^ grid,
double ratio
)
[<ExtensionAttribute>]
static member AdjustLabelRatio :
grid : PropertyGrid *
ratio : float -> unit
GSF.Windows.Forms.PropertyGridExtensions.AdjustLabelRatio = function(grid, ratio);
View SourceParameters
- 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).
RemarksSmaller 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