realbasic-nug
[Top] [All Lists]

Re: Paint?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Paint?
From: Charles Yeomans <yeomans at desuetude dot com>
Date: Mon, 11 Mar 2002 12:23:05 -0500

On Sunday, March 10, 2002, at 05:21  PM, jeb eddy wrote:



Charles Yeomans wrote:



Be aware that Canvas.Graphics is not the same object that you're passed in the Paint event handler; confusing the two can be a problem.

ok, I'm confused. I have thought that they are the same, and my apps work ok. How are they different?



I mean that g <> Canvas.Graphics; that is, they do not refer to the same object. So, for instance, if you write

me.graphics.TextFont = "Times"

in the Open event of the Canvas and put

g.DrawString "Foo", 25, 25

in the Paint event of the Canvas, the text "Foo" will not be rendered using Times; it will be rendered using the System font.

Charles Yeomans




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