I'm have trouble mentally translating the Vb and C# examples I found online. Could someone finish this trivial example of calling a modal dialog and returning the choice that was selected?

import clr
clr.AddReference ('System.Windows.Forms')

from System.Windows import Forms

class MyMainForm(Forms.Form):
    def __init__(self):
        self.Text = 'Main Form'
        my_button = Forms.Button(Text='Choose one!')
       
class MyDialog(Forms.Form):
    def __init_(self):
        self.Text ='Dialog'
        egg_button = Forms.Button(Text='Eggs')
        spam_button = Forms.Button(Text='Spam')
 
app = MyMainForm()           
Forms.Application.Run(app)
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to