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>
|