Dialogs

public static class Dialogs

Methods

KillSplash

#Since v5.0
Destroy the splash screen if it is being displayed.
public static void KillSplash()

SetCustomColorDialog

#ExampleSince v5.0
public static void SetCustomColorDialog()

ShowAboutDialog

#Since v6.0
public static void ShowAboutDialog(
forceSimpleDialog
)

ShowCheckListBox

#Since v5.0
Displays Rhino's check list box.
public static bool[] ShowCheckListBox(
title,
The dialog title.
message,
The dialog message.
items,
A list of items to show.
checkState
A list of true/false boolean values.
)
An array or boolean values determining if the user checked the corresponding box. On error, null.

ShowColorDialog

#Since v5.0 Obsolete v6.0
Displays the standard modal color picker dialog for floating point colors.
public static bool ShowColorDialog(
parent,
Parent window for this dialog, should always pass this if calling from a form or user control.
ref Color4f
color,
The initial color to set the picker to and also accepts the user's choice.
allowAlpha
Specifies if the color picker should allow changes to the alpha channel or not.
)
obsoleteUse ShowColorDialog(object parent, ref Color4f color, bool allowAlpha)
true if a color was picked, false if the user canceled the picker dialog.

ShowColorDialog

#Since v6.0
Displays the standard modal color picker dialog for floating point colors.
public static bool ShowColorDialog(
parent,
Parent window for this dialog, should always pass this if calling from a form or user control.
ref Color4f
color,
The initial color to set the picker to and also accepts the user's choice.
allowAlpha,
Specifies if the color picker should allow changes to the alpha channel or not.
namedColorList,
If not null and contains at least one named color this list will replace the standard Rhino Color list displayed by the rhino color dialog.
colorCallback
May be optionally passed to ShowColorDialog and will get called when the color value changes in the color dialog.
)
true if a color was picked, false if the user canceled the picker dialog.

ShowColorDialog

#Since v6.0
Displays the standard modal color picker dialog for floating point colors.
public static bool ShowColorDialog(
parent,
Parent window for this dialog, should always pass this if calling from a form or user control.
ref Color4f
color,
The initial color to set the picker to and also accepts the user's choice.
allowAlpha,
Specifies if the color picker should allow changes to the alpha channel or not.
colorCallback
May be optionally passed to ShowColorDialog and will get called when the color value changes in the color dialog.
)
true if a color was picked, false if the user canceled the picker dialog.

ShowColorDialog

#Since v6.0
Displays the standard modal color picker dialog for floating point colors.
public static bool ShowColorDialog(
parent,
Parent window for this dialog, should always pass this if calling from a form or user control.
ref Color4f
color,
The initial color to set the picker to and also accepts the user's choice.
allowAlpha
Specifies if the color picker should allow changes to the alpha channel or not.
)
true if a color was picked, false if the user canceled the picker dialog.

ShowColorDialog

#Since v5.0
Display Rhino's color selection dialog.
public static bool ShowColorDialog(
ref Color
color,
[in/out] Default color for dialog, and will receive new color if function returns true.
includeButtonColors,
Display button face and text options at top of named color list.
dialogTitle,
The title of the dialog.
namedColorList
If not null and contains one or more named colors the Rhino color dialog named color list will be replaces with this list.
)
true if the color changed. false if the color has not changed or the user pressed cancel.

ShowColorDialog

#Since v5.0
Display Rhino's color selection dialog.
public static bool ShowColorDialog(
ref Color
color,
[in/out] Default color for dialog, and will receive new color if function returns true.
includeButtonColors,
Display button face and text options at top of named color list.
dialogTitle
The title of the dialog.
)
true if the color changed. false if the color has not changed or the user pressed cancel.

ShowColorDialog

#ExampleSince v5.0
Display Rhino's color selection dialog.
public static bool ShowColorDialog(
ref Color
color
[in/out] Default color for dialog, and will receive new color if function returns true.
)
true if the color changed. false if the color has not changed or the user pressed cancel.

ShowColorDialog

#Since v5.0
Displays the standard modal color picker dialog for floating point colors.
public static bool ShowColorDialog(
ref Color4f
color,
The initial color to set the picker to and also accepts the user's choice.
allowAlpha
Specifies if the color picker should allow changes to the alpha channel or not.
)
true if a color was picked, false if the user canceled the picker dialog.

ShowComboListBox

#Since v5.0
Displays Rhino's combo list box.
public static object ShowComboListBox(
title,
The dialog title.
message,
The dialog message.
items
A list of items to show.
)

selected item.

null if the user canceled.

ShowContextMenu

#Since v5.0
Creates an ETO ContextMenu from an array of strings. Use the modes array to enable/disable menu items
public static int ShowContextMenu(
items,
screenPoint,
modes
)

ShowEditBox

#Since v5.0
Displays Rhino's string edit box.
public static bool ShowEditBox(
title,
The dialog title.
message,
The dialog message.
defaultText,
The default text.
multiline,
Set true for multi line editing.
out string
text
The modified text.
)
true of OK was clicked, false otherwise.

ShowLayerMaterialDialog

#Since v8.0
Show a modal dialog to edit the material in the layer specified in layerIndices.
public static bool ShowLayerMaterialDialog(
doc,
Rhino document
layerIndices
true if the new layer button will be visible.
)
True if the dialog was closed with the OK button. False if the dialog was closed with escape.

ShowLineTypes

#Since v8.0
public static Guid ShowLineTypes(
title,
message,
doc,
selectedLineTypeId
)

ShowLineTypes

#Since v6.7
Displays Rhino's LineType list box.
public static object ShowLineTypes(
title,
The dialog title.
message,
The dialog message.
doc
The active document.
)
The id of the selected item if successful, null on cancel.

ShowListBox

#Since v5.0
Displays Rhino's list box.
public static object ShowListBox(
title,
The dialog title.
message,
The dialog message.
items,
A list of items to show.
selectedItem
The item to preselect.
)
The selected item if successful, null on cancel.

ShowListBox

#Since v5.0
Displays Rhino's list box.
public static object ShowListBox(
title,
The dialog title.
message,
The dialog message.
items
A list of items to show.
)
The selected item if successful, null on cancel.

ShowMessage

#Since v6.0
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
public static ShowMessageResult ShowMessage(
parent,
Parent window
message,
Message box text content.
title,
Message box title text.
buttons,
Which buttons to display in the message box.
icon,
Which icon to display in the message box.
defaultButton,
Which button is the default button.
options,
Additional message box options.
mode
The modality of the message box.
)
One of the ShowMessageBoxResult values.

ShowMessage

#Since v6.0
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
public static ShowMessageResult ShowMessage(
message,
Message box text content.
title,
Message box title text.
buttons,
Which buttons to display in the message box.
icon
Which icon to display in the message box.
)
One of the ShowMessageBoxResult values.

ShowMessage

#Since v6.0
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
public static ShowMessageResult ShowMessage(
message,
Message box text content.
title
Message box title text.
)
One of the ShowMessageBoxResult values.

ShowMessageBox

#Since v5.0 Obsolete v6.0
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
[Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public static DialogResult ShowMessageBox(
message,
title,
buttons,
icon
)
obsoleteUse ShowMessage

ShowMessageBox

#Since v5.0 Obsolete v6.0
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
[Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public static DialogResult ShowMessageBox(
message,
title
)
obsoleteUse ShowMessage

ShowMultiListBox

#Since v5.12
Displays Rhino's multiple selection list box.
public static string[] ShowMultiListBox(
title,
The dialog title.
message,
The dialog message.
items,
A list of items to show.
defaults = null
The items to preselect.
)
The selected items if successful, null on cancel.

ShowNumberBox

#Since v5.0
Displays Rhino's number edit box.
public static bool ShowNumberBox(
title,
The dialog title.
message,
The dialog message.
ref double
number,
The default and return value.
minimum,
The minimum allowable value.
maximum
The maximum allowable value.
)
true of OK was clicked, false otherwise.

ShowNumberBox

#Since v5.0
Displays Rhino's number edit box.
public static bool ShowNumberBox(
title,
The dialog title.
message,
The dialog message.
ref double
number
The default and return value.
)
true of OK was clicked, false otherwise.

ShowPrintWidths

#Since v8.0
Shows the print widths dialogs
public static double ShowPrintWidths(
title,
message,
selectedWidth
)
The selected print width

ShowPrintWidths

#Since v8.0
Shows the print widths dialogs
public static double ShowPrintWidths(
title,
message
)
The selected print width

ShowPropertyListBox

#Since v5.0
Displays Rhino's property list box.
public static string[] ShowPropertyListBox(
title,
The dialog title.
message,
The dialog message.
items,
A list of property names.
values
A list of property values.
)
A list of property values if successful, null otherwise.

ShowPropertyListBox

#Since v8.0
Displays Rhino's property list box.
public static string[] ShowPropertyListBox(
title,
The dialog title.
message,
The dialog message.
items
A list of key value pairs
)
A list of property values if successful, null otherwise.

ShowSelectLayerDialog

#Since v5.0
Displays Rhino's single layer selection dialog.
public static bool ShowSelectLayerDialog(
ref int
layerIndex,
Initial layer for the dialog, and will receive selected layer if function returns DialogResult.OK.
dialogTitle,
The dialog title.
showNewLayerButton,
true if the new layer button will be visible.
showSetCurrentButton,
true if the set current button will be visible.
ref bool
initialSetCurrentState
true if the current state will be initially set.
)
True if the dialog was closed with the OK button. False if the dialog was closed with escape.

ShowSelectLinetypeDialog

#Since v6.0
Displays Rhino's single linetype selection dialog.
public static bool ShowSelectLinetypeDialog(
ref int
linetypeIndex,
Initial linetype for the dialog, and will receive selected linetype if function returns true.
displayByLayer
Displays the "ByLayer" linetype in the list. Defaults to false.
)
True if the dialog was closed with the OK button. False if the dialog was closed with escape.

ShowSelectMultipleLayersDialog

#Since v5.9
public static bool ShowSelectMultipleLayersDialog(
defaultLayerIndices,
dialogTitle,
showNewLayerButton,
out int[]
layerIndices
)
True if the dialog was closed with the OK button. False if the dialog was closed with escape.

ShowSemiModal

#Since v5.0 Obsolete v6.0
Show a windows form that is modal in the sense that this function does not return until the form is closed, but also allows for interaction with other elements of the Rhino user interface.
[Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public static DialogResult ShowSemiModal(
form
The form must have buttons that are assigned to the "AcceptButton" and "CancelButton".
)
One of the System.Windows.Forms.DialogResult values.

ShowSunDialog

#Since v6.0
Show the modal sun dialog.
public static bool ShowSunDialog(
sun
)
Returns true if the user clicked OK, or false if the user canceled.

ShowTextDialog

#Since v5.0
Display a text dialog similar to the dialog used for the "What" command.
public static void ShowTextDialog(
message,
Text to display as the message content.
title
Test to display as the form title.
)