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
 TImageEnMView issue
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

934 Posts

Posted - Nov 11 2022 :  05:30:46  Show Profile  Reply
When clicking a Thumbnail, then the Thumbnail gets selected. So far, so good.

However, when clicking on the white space OUTSIDE a Thumbnail, then always the thumbnail NEXT to the mouse pointer gets selected:



This behavior is undesirable, as I need to DESELECT all thumbnails when I click on a white space:

procedure TformMain.ImageEnMView1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if Button = mbLeft then
  begin
    var ThisImageIdx := ImageEnMView1.ImageAtPos(X, Y);
    if ThisImageIdx = -1 then 
    begin
      ImageEnMView1.Deselect;
    end;
  end;
end;


So how can I avoid selecting a near thumbnail when clicking on the white space?

xequte

38682 Posts

Posted - Nov 13 2022 :  20:18:57  Show Profile  Reply
Hi Peter

Please enable CheckThumbBoundsOnSelect:

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


Also, ImageAtPos has a CheckBounds parameter:

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

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