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?
3 L A T E S T R E P L I E S (Newest First)
xequte
Posted - Apr 15 2024 : 23:08:33 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.
Posted - Apr 15 2024 : 17:07:14 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!
xequte
Posted - Apr 14 2024 : 16:12:14 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