wxPython -3 (wx.Icon)
저번에와 마찬가지로 간단한.... wxFrame 상단에 icon을 추가하는 예제입니다.
#-*-coding:mbcs-*-  
import wx 
class MyFrame(wx.Frame): 
        def __init__(self,parent,id,title): 
                wx.Frame.__init__(self, parent,id,title,size=(200,240),  
            pos=wx.Point(100,100),style=wx.DEFAULT_FRAME_STYLE) 
                 
                # 아이콘 넣기 
                icon=wx.Icon('image\\icon.ico',wx.BITMAP_TYPE_ICO) 
                self.SetIcon(icon)  
                panel=wx.Panel(self,-1)                          
         
        def OnCloseWindow(self, event): 
                self.Destroy() 
class MyApp(wx.App): 
        def OnInit(self): 
                wx.InitAllImageHandlers() 
                self.frame =MyFrame(None,-1,'오토 클리너 v0.1') 
                self.frame.Show() 
                self.SetTopWindow(self.frame) 
                return True  
  
if __name__ == '__main__': 
        app=MyApp(0) 
        app.MainLoop() 

'Python' 카테고리의 다른 글
| wxPython-4 (wx.Bitmap) (0) | 2007.04.12 | 
|---|---|
| wxPython -2 (wx.Frame) (0) | 2007.04.12 | 
| wxPython -1 (wxPython설치) (0) | 2007.04.12 | 


 
 




