kkelchev Posted July 31, 2019 Share Posted July 31, 2019 Hi to All In Calendar panel, events have OnClick event and that is fine. But there is no information about which mouse button has been pressed Left,Right or conceivably mouse wheel. My question is how application to undarstand that (which mouse button) is pressed ? Thanks Kamen Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 3, 2022 Share Posted February 3, 2022 On 7/31/2019 at 12:42 PM, kkelchev said: In Calendar panel, events have OnClick event and that is fine. Hello, Is the question still relevant!? Quote Link to comment Share on other sites More sharing options...
kkelchev Posted February 7, 2022 Author Share Posted February 7, 2022 Yes it is Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 8, 2022 Share Posted February 8, 2022 On 7/31/2019 at 12:42 PM, kkelchev said: In Calendar panel, events have OnClick event and that is fine. But there is no information about which mouse button has been pressed Left,Right or conceivably mouse wheel. My question is how application to undarstand that (which mouse button) is pressed ? Hello, Why do you need it, can you describe your case in more detail !? Quote Link to comment Share on other sites More sharing options...
kkelchev Posted February 18, 2022 Author Share Posted February 18, 2022 Hi I need (for example ) top pop-up menu as usual in Windows with right mouse click. Thanks Kamen Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 22, 2022 Share Posted February 22, 2022 On 2/18/2022 at 11:34 PM, kkelchev said: I need (for example ) top pop-up menu as usual in Windows with right mouse click. Hello, Context menu for events... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 22, 2022 Share Posted February 22, 2022 1. UniCalendarPanel1 -> ClientEvents -> ExtEvents -> function boxready(sender, width, height, eOpts) { var calendar = sender; calendar.getEl().on('contextmenu', function(e, target, options) { var totalOffsetX = target.offsetLeft + 20; var totalOffsetY = target.offsetTop + 80; ajaxRequest(calendar, 'contextmenu', ['eventid='+target.getAttribute('data-eventid'), 'x='+totalOffsetX, 'y='+totalOffsetY]); e.preventDefault(); }, calendar.getEl(), { delegate: '.x-calendar-event' }); } 2. procedure TMainForm.UniCalendarPanel1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'contextmenu' then begin //ShowMessage(Params.Values['eventid']); UniPopupMenu1.Popup(Params.Values['x'].ToInteger(), Params.Values['y'].ToInteger(), Sender); end; end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 22, 2022 Share Posted February 22, 2022 55 minutes ago, Sherzod said: var totalOffsetX = target.offsetLeft + 20; var totalOffsetY = target.offsetTop + 80; ... This seems to work fine for "month"... Quote Link to comment Share on other sites More sharing options...
kkelchev Posted February 24, 2022 Author Share Posted February 24, 2022 Thanks You are great 1 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.