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 popup menu not shown
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

933 Posts

Posted - Dec 15 2023 :  11:06:35  Show Profile  Reply
I have assigned a popup menu to my TImageEnMView at design-time:



However, when I right-click an image on the TImageEnMView, the popup menu is not shown!

Even when setting the PopupMenus property to any value, it does not show the popup menu.

When I show the popup menu in the MouseDown event handler, the right-clicked image is not selected before the popup menu is displayed:

procedure TForm1.ImageEnMView1MouseDown(Sender: TObject; Button: System.UITypes.TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  ScreenPoint: TPoint;
begin
  if Button = Vcl.Controls.mbRight then
  begin
    // Get the index of the image cell at the mouse position?
    // ImageEnMView1.SelectImage(ImageEnMView1.MouseDownThumbIndex);

    // Convert the mouse position of the clicked control to screen coordinates:
    ScreenPoint := ImageEnMView1.ClientToScreen(Point(X, Y));
    // Show the popup menu at the mouse position:
    PopupMenuOptions.Popup(ScreenPoint.X, ScreenPoint.Y);
  end;
end;


How to solve this dilemma?

(BTW, the term MouseDownThumbIndex is not found in the CHM documentation).

xequte

38610 Posts

Posted - Dec 15 2023 :  18:45:28  Show Profile  Reply
Hi Peter

I'm not seeing that. Can you reproduce it in any of our ImageEnMView demos?



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