Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

How to know if Eto forms is closed?

$
0
0

I’m looking to get a boolean result through the output, if the dialog is open or closed, any ideas how to define this?
Here’s a sample code

import Eto.Drawing as drawing
import Eto.Forms as forms

class MyDialog(forms.Dialog):
    def __init__(self):
        self.Title = "Test"
        self.Padding = drawing.Padding(10)

        panel = forms.Panel()
        panel.BackgroundColor = drawing.Colors.AliceBlue
        panel.Content = forms.Label(Text = 'This is a test')

        layout = forms.DynamicLayout()
        layout.AddRow(panel)

        self.Content = layout

def TestMyDialog():
    dialog = MyDialog()
    dialog.ShowModal()

if __name__ == '__main__':
    TestMyDialog()

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles