Click or drag to resize

GH_CapsuleCreateTextCapsule Method (RectangleF, RectangleF, GH_Palette, String, Int32, Int32)

Create a new capsule with content text.

Namespace:  Grasshopper.GUI.Canvas
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public static GH_Capsule CreateTextCapsule(
	RectangleF box,
	RectangleF textbox,
	GH_Palette palette,
	string text,
	int[] radii,
	int highlight
)

Parameters

box
Type: System.DrawingRectangleF
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high.
textbox
Type: System.DrawingRectangleF
Box into which the text will be drawn.
palette
Type: Grasshopper.GUI.CanvasGH_Palette
Colour palette to apply.
text
Type: SystemString
Text to display inside the capsule.
radii
Type: SystemInt32
Radii of rounded corners. This array must contain at least 4 integers. Radii are defined clockwise, starting at the upper left corner.
highlight
Type: SystemInt32
Height of the highlight bar. A value of zero or lower disables the highlight.

Return Value

Type: GH_Capsule
A new instance of GH_Capsule. Caller is responsible for disposing of the object.
See Also