Dialogs
Methods
public static void KillSplash()
Destroy the splash screen if it is being displayed.
Parameters:
| handler (EventHandler<GetColorEventArgs>) |
Parameters:
| forceSimpleDialog (bool) |
public static bool[] ShowCheckListBox(string title, string message, IList items, IList<bool> checkState)
Displays Rhino's check list box.
obsoleteUse ShowColorDialog(object parent, ref Color4f color, bool allowAlpha)
Displays the standard modal color picker dialog for floating point colors.
Parameters:
| parent (IWin32Window) | Parent window for this dialog, should always pass this if calling from a form or user control. |
| color (ref Color4f) | The initial color to set the picker to and also accepts the user's choice. |
| allowAlpha (bool) | Specifies if the color picker should allow changes to the alpha channel or not. |
Returns: true if a color was picked, false if the user canceled the picker dialog.
public static bool ShowColorDialog(object parent, ref Color4f color, bool allowAlpha, NamedColorList namedColorList, OnColorChangedEvent colorCallback)
Displays the standard modal color picker dialog for floating point colors.
Parameters:
| parent (object) | Parent window for this dialog, should always pass this if calling from a form or user control. |
| color (ref Color4f) | The initial color to set the picker to and also accepts the user's choice. |
| allowAlpha (bool) | Specifies if the color picker should allow changes to the alpha channel or not. |
| namedColorList (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 (Dialogs.OnColorChangedEvent) | May be optionally passed to ShowColorDialog and will get called when the color value changes in the color dialog. |
Returns: true if a color was picked, false if the user canceled the picker dialog.
public static bool ShowColorDialog(object parent, ref Color4f color, bool allowAlpha, OnColorChangedEvent colorCallback)
Displays the standard modal color picker dialog for floating point colors.
Parameters:
| parent (object) | Parent window for this dialog, should always pass this if calling from a form or user control. |
| color (ref Color4f) | The initial color to set the picker to and also accepts the user's choice. |
| allowAlpha (bool) | Specifies if the color picker should allow changes to the alpha channel or not. |
| colorCallback (Dialogs.OnColorChangedEvent) | May be optionally passed to ShowColorDialog and will get called when the color value changes in the color dialog. |
Returns: true if a color was picked, false if the user canceled the picker dialog.
Displays the standard modal color picker dialog for floating point colors.
Parameters:
| parent (object) | Parent window for this dialog, should always pass this if calling from a form or user control. |
| color (ref Color4f) | The initial color to set the picker to and also accepts the user's choice. |
| allowAlpha (bool) | Specifies if the color picker should allow changes to the alpha channel or not. |
Returns: true if a color was picked, false if the user canceled the picker dialog.
public static bool ShowColorDialog(ref Color color, bool includeButtonColors, string dialogTitle, NamedColorList namedColorList)
Display Rhino's color selection dialog.
Parameters:
| color (ref Color) | [in/out] Default color for dialog, and will receive new color if function returns true. |
| includeButtonColors (bool) | Display button face and text options at top of named color list. |
| dialogTitle (string) | The title of the dialog. |
| namedColorList (NamedColorList) | If not null and contains one or more named colors the Rhino color dialog named color list will be replaces with this list. |
Returns: true if the color changed. false if the color has not changed or the user pressed cancel.
Display Rhino's color selection dialog.
Parameters:
| color (ref Color) | [in/out] Default color for dialog, and will receive new color if function returns true. |
| includeButtonColors (bool) | Display button face and text options at top of named color list. |
| dialogTitle (string) | The title of the dialog. |
Returns: true if the color changed. false if the color has not changed or the user pressed cancel.
Display Rhino's color selection dialog.
Parameters:
| color (ref Color) | [in/out] Default color for dialog, and will receive new color if function returns true. |
Returns: true if the color changed. false if the color has not changed or the user pressed cancel.
Displays the standard modal color picker dialog for floating point colors.
Displays Rhino's combo list box.
public static bool ShowEditBox(string title, string message, string defaultText, bool multiline, out string text)
Displays Rhino's string edit box.
Show a modal dialog to edit the material in the layer specified in layerIndices.
Parameters:
| doc (RhinoDoc) | Rhino document |
| layerIndices (IEnumerable<int>) | true if the new layer button will be visible. |
Returns: True if the dialog was closed with the OK button. False if the dialog was closed with escape.
Displays Rhino's LineType list box.
Displays Rhino's list box.
Displays Rhino's list box.
public static ShowMessageResult ShowMessage(object parent, string message, string title, ShowMessageButton buttons, ShowMessageIcon icon, ShowMessageDefaultButton defaultButton, ShowMessageOptions options, ShowMessageMode mode)
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
Parameters:
| parent (object) | Parent window |
| message (string) | Message box text content. |
| title (string) | Message box title text. |
| buttons (ShowMessageButton) | Which buttons to display in the message box. |
| icon (ShowMessageIcon) | Which icon to display in the message box. |
| defaultButton (ShowMessageDefaultButton) | Which button is the default button. |
| options (ShowMessageOptions) | Additional message box options. |
| mode (ShowMessageMode) | The modality of the message box. |
Returns: One of the ShowMessageBoxResult values.
public static ShowMessageResult ShowMessage(string message, string title, ShowMessageButton buttons, ShowMessageIcon icon)
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
Parameters:
| message (string) | Message box text content. |
| title (string) | Message box title text. |
| buttons (ShowMessageButton) | Which buttons to display in the message box. |
| icon (ShowMessageIcon) | Which icon to display in the message box. |
Returns: One of the ShowMessageBoxResult values.
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static DialogResult ShowMessageBox(string message, string title, MessageBoxButtons buttons, MessageBoxIcon icon)
obsoleteUse ShowMessage
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
Parameters:
| message (string) | |
| title (string) | |
| buttons (MessageBoxButtons) | |
| icon (MessageBoxIcon) |
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static DialogResult ShowMessageBox(string message, string title)
obsoleteUse ShowMessage
Same as System.Windows.Forms.MessageBox.Show but using a message box tailored to Rhino.
public static string[] ShowMultiListBox(string title, string message, IList<string> items, IList<string> defaults = null)
Displays Rhino's multiple selection list box.
public static bool ShowNumberBox(string title, string message, ref double number, double minimum, double maximum)
Displays Rhino's number edit box.
Displays Rhino's number edit box.
Shows the print widths dialogs
Shows the print widths dialogs
public static string[] ShowPropertyListBox(string title, string message, IList items, IList<string> values)
Displays Rhino's property list box.
public static string[] ShowPropertyListBox(string title, string message, List<KeyValuePair<string, string>> items)
Displays Rhino's property list box.
public static bool ShowSelectLayerDialog(ref int layerIndex, string dialogTitle, bool showNewLayerButton, bool showSetCurrentButton, ref bool initialSetCurrentState)
Displays Rhino's single layer selection dialog.
Parameters:
| layerIndex (ref int) | Initial layer for the dialog, and will receive selected layer if function returns DialogResult.OK. |
| dialogTitle (string) | The dialog title. |
| showNewLayerButton (bool) | true if the new layer button will be visible. |
| showSetCurrentButton (bool) | true if the set current button will be visible. |
| initialSetCurrentState (ref bool) | true if the current state will be initially set. |
Returns: True if the dialog was closed with the OK button. False if the dialog was closed with escape.
Displays Rhino's single linetype selection dialog.
Parameters:
| linetypeIndex (ref int) | Initial linetype for the dialog, and will receive selected linetype if function returns true. |
| displayByLayer (bool) | Displays the "ByLayer" linetype in the list. Defaults to false. |
Returns: True if the dialog was closed with the OK button. False if the dialog was closed with escape.
public static bool ShowSelectMultipleLayersDialog(IEnumerable<int> defaultLayerIndices, string dialogTitle, bool showNewLayerButton, out int[] layerIndices)
Parameters:
| defaultLayerIndices (IEnumerable<int>) | |
| dialogTitle (string) | |
| showNewLayerButton (bool) | |
| layerIndices (out int[]) |
Returns: True if the dialog was closed with the OK button. False if the dialog was closed with escape.
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public static DialogResult ShowSemiModal(Form form)
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.
Parameters:
| form (Form) | The form must have buttons that are assigned to the "AcceptButton" and "CancelButton". |
Returns: One of the System.Windows.Forms.DialogResult values.
Show the modal sun dialog.
Parameters:
| sun (Sun) |
Returns: Returns true if the user clicked OK, or false if the user canceled.