Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 01-01-2017, 06:44 AM
Badger Badger is offline
Join Date: Aug 2013
Location: Sheffield, Tasmania (Aust)
Posts: 74
Default Resetting the "form size" when changing image dimensions.

I am using an image to represent a landscape page with text and graphics on it. The width fits onto the screen but the height is greater than the form's client height so it uses a scrollbar to 'see' the bottom half.

I have a radio control that allows the page to be redrawn in portrait mode at the same scale. Because the width of the image is narrower I clear the old image with a copyrect so the wider part doesn't remain on the form's canvas. Of course, this means that the area off the bottom of screen is larger.

So far so good.

BUT, when I select landscape again and clear the bottom part of the image so it doesn't remain on the form's canvas and then reset the image height, the form considers the copyrect as painted data and won't reset the form's total 'height' to the bottom of the image leaving a nasty blank area below the image.

Does anyone have a solution? The obvious way would be to reset the overall 'height' of a form when it is bigger than the client height but I can't find a way to force it to do that.

Reply With Quote
Old 01-04-2017, 07:38 AM
lexd lexd is offline
Senior Member
Join Date: Feb 2015
Posts: 268

I think you have to look at your overall design of your program
and the way you go about reaching objectives.
I'm saying rethink of better ways to get to a result.

I could say heaps but it would lose its meaning to you.
Afterwords when you have it correct
You must ask questions to your self why you failed first time and what is necessary to avoid the same mistake.
Your key tools and what was wrong with them before building code around them.................
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 03:30 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.