Skip to content

Commit

Permalink
Dialog improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
clicketyclackety committed Jan 6, 2025
1 parent 3513905 commit 0f5d406
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"git.ignoreLimitWarning": true,
"github.copilot.inlineSuggest.enable": true
"github.copilot.editor.enableAutoCompletions": true
}
13 changes: 13 additions & 0 deletions content/en/guides/eto/forms-and-dialogs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,23 @@ Dialogs are modal, Forms are non-modal. Which just means that when you show a di
</div>
</div>


If you paste this into your script editor and run, the Form will show, and then the dialog, however code written after the dialog will not be run until the dialog is closed. It is important to choose a Form or Dialog correctly. It can however be changed easily later on without too much extra effort.

## Forms

{{< code language="python" >}}
import scriptcontext as sc

from Eto.Forms import Form, Dialog

form = Form()
form.Show()

dialog = Dialog()
dialog.ShowModal() # <-- Code execusion stops here
{{< /code >}}

Forms are best used when you want to present information or controls to the user that mix input between the form and the parent window, i.e Rhino. If you want users to be able to run commands and interact with Rhino, a form is the most flexible choice.

For example, a form would be best suited to a help window that the user might consult whilst using Rhino, or a window of custom visibility modes.
Expand Down

0 comments on commit 0f5d406

Please sign in to comment.