From: Kevin A. <al...@se...> - 2002-01-02 20:54:13
|
Ignore the original code, it was bad. This is checked into cvs. > -----Original Message----- > From: pyt...@li... > [mailto:pyt...@li...]On Behalf Of Kevin > Altis > Sent: Wednesday, January 02, 2002 12:02 PM > To: pyt...@li... > Subject: RE: [Pythoncard-users] Message Watcher fix > > > > From: Cliff Wells > > > > It seems to work okay, up until the point that it tries to > delete the old > > messages, then the message window scrolls wildly up and down for a while > > (it seems that maybe deleting the first message causes a scroll > to the top > > of the list, then it scrolls back to the end, then back to the top, > > etc...). Is there a way to lock the list until the deletes are done? > > Okay, let's try some new wxWindows methods, Freeze and Thaw and > see if they > help. > > if used or (not self.hideUnused.GetValue()): > self.msgHistory.Freeze() > while self.msgHistory.GetLastPosition() > 29000: > # delete first line of history > self.msgHistory.Remove(0, self.msgHistory.XYToPosition(0, > 1)) > self.msgHistory.Thaw() > self.msgHistory.AppendText(eventText) > > > It doesn't seem to mangle the first message though =) > > Bonus > > ka > > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > |