bdeLaunchNonModalEditor
Launches a non-modal text editor in the ui.
Syntax
nonModalEditor = bdeLaunchNonModalEditor(text, type, name, withOkCancel, readOnly, funcName, xsz, ysz, handleFilePathModified)
Inputs
- text (Optional)
- This text is added to the text editor when it is created. Default is an empty string.
- type (Optional)
- The type of editor to use. Options are 'text', 'hml', 'oml', 'c', 'modelica', 'spice', 'py', 'fopen'. Default is 'text'.
- name (Optional)
- The name to use for the editor. Default is "Text Editor".
- withOkCancel (Optional)
- Boolean representing if the ok and cancel buttons are on the dialog of the editor. true to have the ok and cancel buttons, false to not have the ok and cancel buttons. Default is true.
- readOnly (Optional)
- Boolean representing if the editor is set to be read only. true for read only, false to be read only.
- funcName (Optional)
- Boolean that represents if a modified file path can be handled by the function. true to handle, false to not handle.
- xsz (Optional)
- The size of the x-axis of the dialog for the editor. Default is -1. This results in the dialog x-axis having a width of 400.
- ysz (Optional)
- The size of the y-axis of the dialog for the editor. Default is -1. This results in the dialog y-axis having a height of 400.
- handleFilePathModified (Optional)
- Boolean that represents if a modified file path can be handled by the function. true to handle, false to not handle.
Outputs
- nonModalEditor
- The non-modal editor that was launched.
Examples
Launch a non-modal text editor:
nonModalEditor = bdeLaunchNonModalEditor("Hello World", "text", "Text Editor", true, false, '', 500, 500, false);
nonModalEditor = hwscpTextEditorDialog
Launch a non-modal text editor (Typing Test text in the editor and pressing ok):
nonModalEditor = bdeLaunchNonModalEditor("", "text", "Text Editor", true, false, '', 500, 500, false);
editorString = hwscpTextEditorDialog