That is better. What it does not do is resize the image. I want
to be able to resize the image to the
max(form size,area covered by shapes)
I have a list of shapes so can easily redraw them. I want scroll
bars when ever the canvas is larger than the image. The image
could, theoretically, get very big but it will not usually get bigger
than about 3000x3000 (which is big enough).
What your sample did not do was actually change the image size.
Chrissy.
----- Original Message -----
From: Nello Sestini <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 10:48 AM
Subject: Re: [DUG]: MDI Form Size
> Chrissy
>
> > I get scroll bars but when I try to scroll the shapes redraw in the
> > original position but the scroll bars have moved - the thing just
> > does not look or behave correctly. I will look at your project
> > and see if it is different than mine and see if it shows what I
> > have done wrong.
>
>
> ah - NOW i think I understand what you are objecting to.
>
> earlier, Corey suggested that you could "draw to fit" the
> scrolling area. This would solve your problem - but would
> make the shapes "scale" to the new size of the MDIChild.
>
> If that isn't what you want - i.e. you want the shapes to
> stay the same size, but want the stuff to scroll if it doesn't
> fit the MDIChild, then use a TScrollBox to manage the
> scrolling (instead of the Forms scrolling).
>
> Here's a new project like the earlier one with this additional
> TScrollBox twist: http://roserox.co.th/dugnz/chrissy2.zip
>
> Some stuff to notice:
>
> 1. TScrollbox doesn't have a canvas - so I am drawing
> on a TImage contained in the TScrollbox.
> 2. The scrollbars on the form are disabled. The
> bars that automagically appear are from the TScrollbox
> 3. The size of the image doesn't change. It's set
> once when the form is created, and doesn't resize
> (and isn't aligned)
> 4. The scrollbox is aligned to the form client area
> and autoscroll is ON
>
> I hope this is closer to what you want than the first
> attempt was.
>
> -ns
>
> ---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"