HT clear some wxPython fram?

Klaus Reinhardt K.Rdt at TU-Berlin.DE
Wed Jul 3 15:18:52 EDT 2002


Am 03.07.02 20:47:14, schrieb Cliff Wells <logiplexsoftware at earthlink.net>:


>class MyPanel(wxPanel):
>    def __init__(self, parent, fontsize = 12):
>        wxPanel.__init__(self, parent, -1)
>        self.SetBackgroundColour(wxWHITE)
>        self.text = []
>        self.fontsize = fontsize
>        EVT_PAINT(self, self.OnPaint)
>
>    def draw(self, dc):
>        dc.Clear()
>        font = wxFont(self.fontsize, wxMODERN, wxNORMAL, wxNORMAL)
>        dc.SetFont(font)
>        y = 0
>        for t in self.text:
>            dc.DrawText(t, 0, y)
>            y += self.fontsize + 2
>
---------------------------------------------------------------------
Hi

OK! Well done. 

A further problem: The frame is 'renewed' after 14 rows, so the netstat-output is in the
beginning (more than) doubled. Is some sort of - excuse me - GOTOXY? Or is this another
buffer(?)problem?

BTW: I've now subscribted to wxpython-group.

		K at Rdt
---------------------------------------------------------------------








More information about the Python-list mailing list