M.Ammar Posted October 14, 2019 Share Posted October 14, 2019 Hi I have one TUniPopupMenu that I want to use with many Unbuttons/or Unipanel on the same form "Card Type of form" I have found some solutions in the forum but it is slow and have to click 2or3 times for the menu to show procedure TfraCardView.UniCPBaseMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if Button = mbRight then begin UniPopupMenu1.Popup(X, Y, Sender); end; end; // examble to use it on a panel for I := 1 to 50 do Begin PanelInfo := TUniContainerPanel.Create(Self); with PanelRoomInfo do begin Parent := PanelCenter; Name := 'UniPanelInfo_' + I; OnMouseUp := UniCPBaseMouseUp; end; End; and the same result with PopupBy procedure TfraCardView.UniMenuButton1Click(Sender: TObject); begin UniPopupMenu1.PopupBy(Sender as TUniMenuButton); End; and use it like this MenuButton := TUniMenuButton.Create(Self); with MenuButton do begin Parent := PanelTop; width := 100; MenuButton.OnClick := UniMenuButton1Click; MenuButton.ArrowBottom := True; end; the problem is that some times the user have to click 2 or 3 times in order for the menu to show, I have also tried to create separate menu with menu items for every card it works better, but the form takes Much longer to load and not easy to manage. any suggestions or alternatives? Best Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 14, 2019 Share Posted October 14, 2019 11 minutes ago, M.Ammar said: the problem is that some times the user have to click 2 or 3 times in order for the menu to show, Hello, Sorry, can you make a simple testcase for this?! Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted October 14, 2019 Author Share Posted October 14, 2019 1 hour ago, Sherzod said: Hello, Sorry, can you make a simple testcase for this?! Actually after making the testcase I found out that it is misunderstanding from my side , you see the first menu opens up fast then the 2nd open up after 2 clicks because the first click is used to close the first menu thanks for reply Card Test.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 14, 2019 Share Posted October 14, 2019 4 minutes ago, M.Ammar said: you see the first menu opens up fast then the 2nd open up after 2 clicks because the first click is used to close the first menu So, "problem" solved? Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted October 14, 2019 Author Share Posted October 14, 2019 2 minutes ago, Sherzod said: So, "problem" solved? if this is normal behaviour then I think it is not a problem unless you can find away to close the menu on a panel and open it on another panel is the same click it will be better user experience. Best Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 14, 2019 Share Posted October 14, 2019 57 minutes ago, M.Ammar said: Card Test.rar Can you check once again your test case for the correct paths of your modules? Quote Link to comment Share on other sites More sharing options...
M.Ammar Posted October 14, 2019 Author Share Posted October 14, 2019 53 minutes ago, Sherzod said: Can you check once again your test case for the correct paths of your modules? Sorry for that , please Check Now. Card Test.rar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.