ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Problem with alClient in TImageEnVect

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
aruest Posted - Sep 19 2016 : 08:01:09
I drop a TImageEnVect on a panel control. The panel control's Align property is set to alClient. The TImageEnvect align property is also set to alClient.

When the user runs the application and maximizes the window, the TImageEnVect's size remains to the size it was before the maximize command.

In other words it remains smaller than the new panel size.

My understanding of alClient was that controls could automatically resize.

Is this behaviour different in TImageEnVect?
8   L A T E S T    R E P L I E S    (Newest First)
aruest Posted - Sep 19 2016 : 12:19:35
I was not planning on loading an image onto the background.

Thank you for the advice!
w2m Posted - Sep 19 2016 : 11:30:58
Be advised that if you load an image into the background image, it too will be affected. So I would not use the OnResize event for this unless you plan on not loading a background image.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
aruest Posted - Sep 19 2016 : 11:23:07
Bill,

Thank you very much.

Your code works fine when it is included in the OnResize event of the main form.

Thank you!

Andre
w2m Posted - Sep 19 2016 : 10:52:53
I have duplicated your findings, except the TImageEnVect is properly aligned to the client panel when maximized. The "white" rectangle in the center is the bitmap not the previous form dimensions. You can correct the problem with this:
procedure TForm1.FormCreate(Sender: TObject);
begin
  ImageEnVect1.Proc.Resample(ImageEnVect1.ClientWidth, ImageEnVect1.ClientHeight);
  ImageEnVect1.IEBitmap.Fill(clRed);
  ImageEnVect1.Update;
end;

or

procedure TForm1.FormCreate(Sender: TObject);
begin
  ImageEnVect1.Clear;
  ImageEnVect1.Update;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
aruest Posted - Sep 19 2016 : 10:31:44
First image shows the sample project in the IDE:
I've made the background clRed just to make identification easier




The I run the application and this it what it shows:





Finally, if I maximize the form, this is what appears:




Notice the grey rectangle in the middle which corresponds to the form's original size.
w2m Posted - Sep 19 2016 : 10:20:20
I can not duplicate your results.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
aruest Posted - Sep 19 2016 : 10:19:03
Bill,

If I drop the TImageEnVect directly on a form, when I maximize the form, the TImageEnVect correctly resizes.

However, if I first drop a TPanel onto the form, set it to alClient and then drop the TImageEnVect onto the TPanel such that the TIMageEnVect is a child control of the TPanel and is also set to alClient, then when I maximize the form, the TImageEnVect remains at it's original size.
w2m Posted - Sep 19 2016 : 09:37:19
No. It is not different. A small test project works correctly here. Is it possible some code is causing the problem, or maybe the TImageEnVect is not in the panel?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development