Commits

_vios committed c3c7edf

カスタムダイアログが作成できるようになった

Comments (0)

Files changed (2)

 import wx
 
 class ResultDialog(wx.Dialog):
-    def __init__(self,parent,title=u"更新されたページ",size=wx.DefaultSize,pos=wx.DefaultPosition,
+    def __init__(self,parent,ID,title=u"更新されたページ",size=wx.DefaultSize,pos=wx.DefaultPosition,
             style=wx.DEFAULT_DIALOG_STYLE,useMetal=False,):
-        pass
+        #wx.Dialog.__init__(parent,-1,title,size,pos,style)
+
+        pre = wx.PreDialog()
+        pre.Create(parent,ID,title,pos,size,style)
+        self.PostCreate(pre)
+
+        #put Widgets
+        sizer = wx.BoxSizer(wx.VERTICAL)
+
+        testST = wx.StaticText(self,-1,"test label")
+        sizer.Add(testST,0,wx.ALIGN_CENTER|wx.ALL,5)
+
+        self.SetSizer(sizer)
+        sizer.Fit(self)
+
+
 import wx
 import os
 import glob,shutil
+
 import webdb
+import ResultDialog
 
 
 class MainWindow(wx.Frame):
         #self.sizer3.Add(self.buttonDelete,1,wx.EXPAND)
         self.btAddUrl.Bind(wx.EVT_BUTTON,self.selectAddUrl)
         self.btDelUrl.Bind(wx.EVT_BUTTON,self.selectDelUrl)
+        self.btCheck.Bind(wx.EVT_BUTTON,self.selectCheck)
         #self.buttonDelete.Bind(wx.EVT_BUTTON,self.selectDelete)
 
 
         self.urlListBox.Refresh()
         print "dclicked"
 
+    def selectCheck(self,e):
+        dlg = ResultDialog.ResultDialog(self,-1)
+        dlg.ShowModal()
     """
+
+
+
     def selectDelete(self,e):
         global dirPath
         if dirPath is None :