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
 OnZoomIn/OnZoomOut issue

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
PeterPanino Posted - Mar 07 2024 : 12:04:03
The events TImageEnView.OnZoomIn and TImageEnView.OnZoomOut are not triggered when setting the Zoom programmatically, for example:

ImageEnView1.Zoom := ImageEnView1.Zoom + 10;


However, they are triggered when setting the Zoom with the mouse wheel.

This is shown in the following test project:

attach/PeterPanino/20243712229_MouseInteractionsTest_ZoomIssue.zip
76.92 KB

Is this a bug?
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 08 2024 : 14:34:35
Then by definition, that is not a user activity that is changing zoom, it is your code.

You should just change your code to:

ImageEnView1.Zoom := ImageEnView1.Zoom + 10;
ImageEnView1ZoomIn( nil );

Which is nice and easy, unlike the counter which would be difficult. i.e. if OnZoomIn reacted to code changes, then how would you differentiate between the event occurring due to a code change or a user change?

Think about TEdit.OnChange or TCheckbox.OnClick, how do you determine whether the change was by the user or by your code?



Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Mar 08 2024 : 10:20:02
As per the definition, the user changes the zoom when clicking a button that executes:

ImageEnView1.Zoom := ImageEnView1.Zoom + 10;
xequte Posted - Mar 07 2024 : 19:48:18
Hi Peter

As per the documentation, OnZoomIn/OnZoomOut only occur when the user changes the zoom.

Nigel
Xequte Software
www.imageen.com