Frame

public static class Frame
The standard Grasshopper tooltip form. There can only ever be one tooltip, hence this class is static.

Fields

DefaultPainterHeight

#
public const int DefaultPainterHeight = 150

DefaultPainterWidth

#
public const int DefaultPainterWidth = 300

Properties

ScreencapFolder

#
public static string ScreencapFolder { get; set; }
Gets or sets the folder into which tooltip images are automatically captured.

Visible

#
public static bool Visible { get; }
Gets whether the tooltip is currently visible.

Methods

CreateShortcutPainter

#
public static (Action<Context, Rectangle> painter, Size size) CreateShortcutPainter(string prefix, char key, string suffix)
Create a painter for a shortcut key cue.
prefix (string)Prefix.
key (char)Shortcut keys.
suffix (string)Shortcut suffix.

CreateShortcutPainter

#
public static (Action<Context, Rectangle> painter, Size size) CreateShortcutPainter(string prefix, Keys keys, string suffix)
Create a painter for a shortcut key cue.
prefix (string)Prefix.
keys (Keys)Shortcut keys.
suffix (string)Resulting painter.

CreateTextAndIconPainter

#
public static (Action<Context, Rectangle> painter, Size size) CreateTextAndIconPainter(object[] elements)
Create a painter for a sequence of strings and icons.
elements (object[])A sequence containing only string or IIcon instances.

Hide

#
public static void Hide()
Hide the tooltip if it happens to be visible.

Invalidate

#
public static void Invalidate()
Force a redraw on the currently visible tooltip, if any.

Show

#
public static void Show(IIcon icon, string caption, string message, Action<Context, Rectangle> painter, Size paintingSize = default(Size), bool warnings = false, bool errors = false)
Show the tooltip.
icon (IIcon)Optional icon.
caption (string)Caption text.
message (string)Message text.
painter (Action<Context, Rectangle>)Data drawing delegate.
paintingSize (Size = null)Requested diagram size, this field is not necessarily obeyed.
warnings (bool = false)True if tooltip should indicate the existence of warnings.
errors (bool = false)True if tooltip should indicate the existence of errors.

Show

#
public static void Show(IIcon icon, string caption, string message, bool warnings = false, bool errors = false)
Show the tooltip.
icon (IIcon)Optional icon.
caption (string)Caption text.
message (string)Optional message text.
warnings (bool = false)True if tooltip should indicate the existence of warnings.
errors (bool = false)True if tooltip should indicate the existence of errors.

Show

#
public static void Show(IIcon icon, string caption, string message, LazyStrings item, bool warnings = false, bool errors = false)
Show the tooltip.
icon (IIcon)Optional icon.
caption (string)Caption text.
message (string)Optional message text.
item (LazyStrings)Optional data text.
warnings (bool = false)True if tooltip should indicate the existence of warnings.
errors (bool = false)True if tooltip should indicate the existence of errors.

Show

#
public static void Show(IIcon icon, string caption, string message, LazyStrings[] items, bool warnings = false, bool errors = false)
Show the tooltip.
icon (IIcon)Optional icon.
caption (string)Caption text.
message (string)Optional message text.
items (LazyStrings[])Optional data text.
warnings (bool = false)True if tooltip should indicate the existence of warnings.
errors (bool = false)True if tooltip should indicate the existence of errors.