gettingstarted
[Top] [All Lists]

Re: Update editField in a paint event

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Update editField in a paint event
From: CV <atauqua at hit dot net>
Date: Tue, 1 Feb 2005 00:40:19 -0600
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <A061AB5E-73DF-11D9-85CC-000D93C6DE52 at spamcop dot net>
Hopefully, Number is not a local variable.

In a simple project, with Number as Integer added as a window property, it works fine for me:

        In Paint event:
                self.Number = self.Number + 1
                EditField1.text = str(self.Number)

When I resize the window, the editfield displays the correct count.

HTH,

Jack


On Jan 31, 2005, at 5:27 PM, Barrie Jones wrote:

Can someone please let me know if the following editField behavior is normal or possibly caused by my program.
The setup:
I have an EditField that should be updated each time a graphics operation is performed. The update code, myField.text = str(number) is in a graphics method called by the canvas paint event.
 "number" is incremented every time the paint event is fired.
The problem:
myField.text appears to update with the first pass, but remains the same after each subsequent pass through the paint event.

The problem is fixed by placing myField.text = str(number) outside the paint event.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>