[wxPython] 이벤트04 (사이즈 이벤트 예제 : wx.EVT_PAINT)

# -*- coding: cp949 -*-

#!/usr/bin/python
# paintevent.py

import wx

class PaintEvent(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title)
        # Paint 이벤트 함수와 연결
        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Centre()

    # Paint 이벤트 처리함수
    def OnPaint(self, event):
        # 벨 울리기
        wx.Bell()


class MyApp(wx.App):
    def OnInit(self):
        pe = PaintEvent(None, -1, 'paintevent.py')
        pe.Show(True)
        return True

app = MyApp(0)
app.MainLoop()

by 하린아빠 | 2008/02/26 19:10 | wxPython | 트랙백 | 덧글(0)
트랙백 주소 : http://pythondev.egloos.com/tb/104069
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글



< 이전페이지 다음페이지 >