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
 Trigger OnZoom eventhandlers from Toolbar?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

860 Posts

Posted - Jun 28 2020 :  04:34:59  Show Profile  Reply
It seems that changing the ZOOM from the ImageEnView Toolbar does not trigger the TImageEnView OnZoomIn and OnZoomOut event handlers:



I need this to update a Zoom percentage display:

procedure TformMain.imgMainZoomIn(Sender: TObject; var NewZoom: Double);
begin
  ShowZoom;
end;

procedure TformMain.imgMainZoomOut(Sender: TObject; var NewZoom: Double);
begin
  ShowZoom;
end;

xequte

38180 Posts

Posted - Jun 29 2020 :  00:43:45  Show Profile  Reply
Hi

Please use the OnViewChange event for this. It covers all methods that might affect zoom level.

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

PeterPanino

860 Posts

Posted - Jun 29 2020 :  11:10:15  Show Profile  Reply
Hi Nigel,

thanks, now it works!

BTW, the UNDO button on the toolbar has only ONE undo-step:



There is no TImageEnView.UndoSteps: Integer property.

I have tried to put this into the FormCreate event-handler:

ImageEnView1.Proc.AutoUndo := True;


But it seems it has no effect.

How can I increase the number of the Toolbar Undo steps to a custom value?
Go to Top of Page

PeterPanino

860 Posts

Posted - Jun 29 2020 :  11:49:04  Show Profile  Reply
Eureka! This one did the trick:

procedure TformMain.FormCreate(Sender: TObject);
begin
  ImageEnView1.Proc.UndoLimit := 100;
end;
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: