Checklist Eto

Hello, I’m trying to make my first code with the eto framework, I want to make a checklist, when I minimize the dialog window, it doesn’t let me interact with the rhinoceros window, if anyone can help me I’d be grateful.

import rhinoscriptsyntax as rs
from Rhino.UI import *
from Eto.Forms import *
from Eto.Drawing import *

def main():
    op = ["OP1", "OP2", "OP3"]
    lista = rs.ListBox(op, "Choose the Checklist", "Checklist")
    if lista == "OP1":
        def op1():
            dialog = Dialog()
            dialog.Title = "Checklist op1"
            dialog.ClientSize = Size(300, 300)
            dialog.Padding = Padding(5)
            dialog.Resizable = True
            dialog.Minimizable = True
            dialog.Maximizable = True
            dialog.ShowInTaskbar = True
           
            
            checkbox = CheckBox()
            checkbox.Text = "Points"
            checkbox2 = CheckBox()
            checkbox2.Text = "Colors"
            
            stack_layout = StackLayout()
            stack_layout.Spacing = 5
            stack_layout.Items.Add(checkbox)
            stack_layout.Items.Add(checkbox2)
            
            dialog.Content = stack_layout
            
            result = dialog.ShowModal(RhinoEtoApp.MainWindow)
           
        if __name__ == "__main__":
            op1()
main()

hi @Roberto_da_Silva_Kum I edited your post to display the code better

does this help? I took out the dialog part and put that in a new class, and made Rhino ‘own’ the dialog

import rhinoscriptsyntax as rs
from Rhino.UI import *
from Eto.Forms import *
from Eto.Drawing import *
import Rhino

class dialog(Form):
    def __init__(self):
        self.Title = "Checklist op1"
        self.ClientSize = Size(300, 300)
        self.Padding = Padding(5)
        self.Resizable = True
        self.Minimizable = True
        self.Maximizable = True
        self.ShowInTaskbar = True
        
        
        checkbox = CheckBox()
        checkbox.Text = "Points"
        checkbox2 = CheckBox()
        checkbox2.Text = "Colors"
        
        stack_layout = StackLayout()
        stack_layout.Spacing = 5
        stack_layout.Items.Add(checkbox)
        stack_layout.Items.Add(checkbox2)
        
        self.Content = stack_layout

def main():
    op = ["OP1", "OP2", "OP3"]
    lista = rs.ListBox(op, "Choose the Checklist", "Checklist")
    if lista == "OP1":
        def op1():
            mydialog = dialog()
            mydialog.Owner=Rhino.UI.RhinoEtoApp.MainWindow
            mydialog.Show()
           
        if __name__ == "__main__":
            op1()
main()

Hi @Gijs it helped a lot, thank you.
Would you have a place to learn how to use Eto?

@Roberto_da_Silva_Kum have you seen Rhino - Writing Custom Eto forms in Python?

Other than that, best way to learn is to build stuff and ask your questions on this forum