Chris Moore wrote:
> I noticed in your code snippet this construct :with Control.Canvas, Font
>
> Can you explain the comma why does it work?
> I thought the construct should have been Control.Canvas.Font (which does NOT
> work)
>
> Cheers - Chris
>
> -----Original Message-----
> <*snip*>
>
> with Control.Canvas, Font do begin
> FillRect(Rect);
> <*snip*>
It's syntactic sugar for this:
with Control.Canvas do begin
with Font do begin
FillRect(Rect);
end;
end;
The "with" statement has always supported that syntax. Read more about
it in the help, which actually spends a lot of space describing the
multi-object syntax.
--
Rob
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi