> > 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).
>
> I am still confused here about exactly how you want this to behave.
>
> On one hand - you want to resize the image.

Yes.

> I'm assuming you
> mean to do this as a response to someone resizing the MDIChild
> window that contains that image.  (right?)

No.


> So - the image is
> supposed to "scale" to fit the MDIChild.

No.


> But if this is what happens
> when will you EVER need the scroll bars?

Most of the time.


> The image will always
> fit in the client area of the MDIChild and won't need to be scrolled.

Not the way I want it.


> On the other hand you want scroll bars when the "canvas is larger than
> the image".    (I assume you mean the other way around - i.e.
> when the image is larger than the canvas).   But if we do it this
> way, what is the new size of the image suppose to be?   (This is
> what that last gadget did).

No quite.


> I am thinking here that maybe there is some OTHER event in your
> program that makes the sizes of the images change

There is.

> (i.e. NOT
> only the resizing of the MDIChild container windows) and that
> is the missing piece of the puzzle.

It is.



> Please enlighten ...

Ok.

I will have many MDI child forms.  Each one whould have  the same
behaviour.  They should contain a diagram that may be only 100x100 or
as large as 2000x2000.  This size is determined by the user.  The more
he/she wants to put on each "page" then bigger it has to be.  Separately,
the MDI child has to fit on the users screen and the user has to be able
tile all the MDI child forms.  Each MDI child form may have scroll bars
visible if the user has placed lots of stuff on that form.  The canvas (and I
think I am using that term correctly) may be anywhere between 100 to
2000 by 100 to 2000 (not square) and the MDI child can be anywhere
from 20 to 'max screen size' buy 20 to 'max screen size'.  The canvas,
image using your example, will never be less than the MDI child form
size.

Separately:
Your example worked except that if the design size of the image is
small - 100x100 - then the image can be resized but the image on the
bits past 100 is either direction does not draw.  If I set the design time
size to 2000x2000 and then resize the image at runtime I get to draw
on the total surface.  This, to me, shows a strange behaviour that I can
not explain.  I think that your example works for what I want if I make the
image big at design time.

Also, if I make the image more than a bit over 2000 (probably 2048 or
2047) then run the app it comes up with an access violation.  These two
things make me think that there is a problem with the image component.
This could be because it is meant to have an image in it and not be a
drawing surface.

Is this explanation more clear?


Chrissy.



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

Reply via email to