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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Clear issue
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

862 Posts

Posted - Apr 13 2024 :  10:34:18  Show Profile  Reply
(ImageEnView1.Align = alClient)

This code clears the IEBitmap:

procedure TForm1.mClearTheImageClick(Sender: TObject);
begin
  ImageEnView1.IEBitmap.Clear;
  ImageEnView1.Update;
end;


However, it is not visually updated - although the ImageEnView is updated in code:

ImageEnView1.Update;


Only when I MANUALLY RESIZE the image with the mouse by resizing the form, the ImageEnView gets visually updated!

How can I programmatically update after the Clear?

xequte

38189 Posts

Posted - Apr 14 2024 :  16:12:14  Show Profile  Reply
Hi Peter

For TImageEnView, you should use ImageEnView1.Clear() or ImageEnView1.Blank().

But your code should be OK. What specifically do you see? Has the control gone white? What are the values of ImageEnView1.LockUpdateCount and ImageEnView1.LockPaintCount

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

PeterPanino

862 Posts

Posted - Apr 15 2024 :  17:07:14  Show Profile  Reply
When I use ImageEnView1.Clear(), the image size remains the same as before - only the image disappears. I.e., the image area can still be selected!

After that, when I set the IEBitmap size to 0, the image reappears! Then, when I resize the window with the mouse, the image disappears and ImageEnView1 becomes white!
Go to Top of Page

xequte

38189 Posts

Posted - Apr 15 2024 :  23:08:33  Show Profile  Reply
Hi Peter

ImageEnView1.Clear() only clears the images, use ImageEnView1.Blank() to reset its size.

For historical reasons ImageEnView does not like 1x1 images (ImageEnView.Blank), but the latest beta handles 0x0 images (IEBitmap.Clear) too. You can email me for it.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: