Click or drag to resize

GH_FormatFormatFilePath Method (String, Int32, Font)

Format a filepath so that it doesn't exceed width. If the filepath filename is already longer than maxLength it will be returned intact.

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static string FormatFilePath(
	string path,
	int maxWidth,
	Font font
)

Parameters

path
Type: SystemString
Path to format.
maxWidth
Type: SystemInt32
Maximum allowed width (in pixels)
font
Type: System.DrawingFont
Font to use for measuring.

Return Value

Type: String
The formatted path.
See Also