2.7 Creating a Dialog Window

Dialogs are used to interact with the user and get specific inputs. In the previous sections we used the pre-built dialog wx.FileDialog. We are now going to develop our own Dialog for the About menu option.


    def OnMenuHelpAboutMenu(self, event):
        dlg = Dialog1.Dialog1(self)
        try:
            dlg.ShowModal()
        finally:
            dlg.Destroy()



import wx
import Dialog1

 

def OnButton1Button(self, event):
   self.Close()


Run the application. Your new Dialog should look something like this.


About Dialog


Congratulations: You have built your first application using Boa Constructor. Your editor is complete. In this tutorial you have used the core components of Boa.

Take time to review what you have done so far. You have learnt how to: