gettingstarted
[Top] [All Lists]

Update editField in a paint event

To: RealBasic getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Update editField in a paint event
From: Barrie Jones <barrie at spamcop dot net>
Date: Mon, 31 Jan 2005 18:27:08 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
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.

Another problem that may or may not be related is that MsgBox text does not show up in methods called by a canvas paint event. A msgBox window appears on cue, but the window is blank. (No text and No button). The invisible button can be activated with return or a well placed mouse click.

If the above is not normal behavior, I will dig deeper into my code.

iBook G4, OSX, RB 5.5.3

Thanks
Barrie

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