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
 Detect Double-Click on Thumbnail in ImageEnView?

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 - Dec 22 2022 : 09:21:07
There is no OnThumbnailDblClick event in ImageEnView!

I cannot use the OnDblClick event because the behavior of double-clicking is different when EnableMultiSelect = True and multiple thumbnails are selected:

1. When double-clicking on a THUMBNAIL (selected or unselected), the multiple thumbnails are deselected, and the double-clicked thumbnail gets selected

2. When double-clicking on empty space, the multiple thumbnails remain selected and are NOT deselected

According to logic, this makes it necessary to detect a double-click on a thumbnail explicitly if I need to take action on a double-clicked thumbnail.
2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 23 2022 : 17:12:10
Hi Peter

In the dblclick event get the current mouse position:

pt := ScreenToClient( Mouse.CursorPos );

Then use with ImageAtPos with CheckBounds = True:

http://www.imageen.com/help/TImageEnMView.ImageAtPos.html



Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Dec 22 2022 : 22:59:59
To differentiate between a double-click on a thumbnail and a double-click on white space in the ImageEnMView control, I tried the TImageEnMView.MouseDownThumbIndex information in the TImageEnMView.DblClick event-handler:

procedure TformMain.ImageEnMView1DblClick(Sender: TObject);
begin
  CodeSite.Send('ImageEnMView1.MouseDownThumbIndex', ImageEnMView1.MouseDownThumbIndex);
end;


This works ALMOST (!) correctly: However, when double-clicking WAY BELOW the last thumbnail row, MouseDownThumbIndex gets a positive result instead of -1!

https://app.screencast.com/SJyifkWakas1X