Grasshopper API
GH_CapsuleCreateTextCapsule Method (Rectangle, Rectangle, GH_Palette, String, Font, GH_Orientation) |
Create a new capsule with content text.
Namespace: Grasshopper.GUI.Canvas
Assembly: Grasshopper (in Grasshopper.dll)

public static GH_Capsule CreateTextCapsule( Rectangle box, Rectangle textbox, GH_Palette palette, string text, Font font, GH_Orientation orientation )
Public Shared Function CreateTextCapsule ( box As Rectangle, textbox As Rectangle, palette As GH_Palette, text As String, font As Font, orientation As GH_Orientation ) As GH_Capsule
Parameters
- box
- Type: System.DrawingRectangle
Box for capsule dimensions. The box will be grown until it is at least 3 pixels wide and high. - textbox
- Type: System.DrawingRectangle
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. - font
- Type: System.DrawingFont
Font to draw text with. - orientation
- Type: Grasshopper.GUI.CanvasGH_Orientation
Orientation of text within box.
Return Value
Type: GH_CapsuleA new instance of GH_Capsule. Caller is responsible for disposing of the object.
