> > Prior to previous post, I added  .Visible=True statements to the cloning
> > loop.
>
> That's good, but it doesn't prove that they're not invisible.
> Their Visible property might get turned off later; or they might
> have a parent (or further ancestor) whose .Visible property is
> false, in which case their own Visible property doesn't matter at all.
>
> > Again, all Canvases are doing the right graphical stuff, as
> addressed from
> > Methods.
>
> I'm not sure I understand what you mean by this.  Do you mean
> that if you have some button somewhere, that draws directly to
> (say) the 5th canvas's Graphics property, then you see this drawing?

Yes, there's a button Action that generates new display patterns, so
there are various Graphics methods being called in the Button Action.
I understand now that the best way to handle Canvas refresh and
painting is to paint to an offscreen Picture and refer to that
Picture in the Canvas Paint Event, but I did not start out that way,
and I have everything as required, except the refresh of cloned
Canvases. I can instantiate all required Canvases by drag/drop, but
would like to understand what's going on (er, not going on)...
>
> (That would indeed be damning evidence for the Paint event...)
>
> > If I instantiate any Canvas in Window1 by dragging it in
> (anywhere), then
> > that instance triggers Paint and refreshes. It seems to me that
> that proves
> > that this cannot be a matter of malpositioning, since I use the
> same code to
> > position and size the canvases, regardless of whether they were
> dragged in
> > or cloned.
>
> Well, that supports it, but doesn't prove it.  A good proof would
> be to put something in the MouseMove event (like a Speak command
> or System.DebugLog), reporting the index number, and then show
> that these non-painting canvases nonetheless respond when you
> wave your mouse over them.  Or, do the same thing via the HelpTag
> property.
>
> Clearly there is SOMETHING going wrong in your code, because when
> I try to reproduce the problem in a simple app, it works fine.  I
> put a small canvas on a window, gave it an index of 0, put this
> in the Window.Open event:
>
>   for i As Integer = 1 to 5
>     Dim c As Canvas = New Canvas1
>     c.Top = i*60
>     c.Left = i*20
>   next
>
> and put in the canvas's Paint event:
>
>   g.FillOval 0, 0, g.width, g.height
>
> and when I run, I see six ovals, exactly as one would expect.
> Does this simple test work for you?  If so, then you need to keep
> digging to find out what's different about your real app that is
> causing these canvases to be invisible (since that's the only
> thing I can think of that would prevent Paint from firing).
>
> HTH,
> - Joe
>
I get the proper behavior with a simple app. I also put a Beep statement
in the MouseOver Event for the Canvases, and they all cause Beep, so
they do exist in their expected locations. I'll dig deeper.
Paul

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

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

Reply via email to