mierlp Posted September 10, 2018 Share Posted September 10, 2018 How can i connect a popup menu to a uniDBmemo and when the user clicks the right button to show the popup NOTE: I have set MainModule.BrowserOptions.boDisableMouseRightClick = True but do not know if the solutions is working. I can use a key combination is to show the popup that's not a problem. Regards Peter Quote Link to comment Share on other sites More sharing options...
mierlp Posted September 14, 2018 Author Share Posted September 14, 2018 Not possible ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 14, 2018 Share Posted September 14, 2018 Hi, This is possible I think Quote Link to comment Share on other sites More sharing options...
mierlp Posted September 15, 2018 Author Share Posted September 15, 2018 suggestion ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 15, 2018 Share Posted September 15, 2018 43 minutes ago, mierlp said: suggestion ? For example: UniDBMemo1 -> ... function afterrender(sender, eOpts) { var me=sender; me.el.dom.addEventListener('contextmenu', function(e){ Ext.defer(function(){ ajaxRequest(me, 'cmenu', ['x='+e.layerX,'y='+e.layerY]); }, 150); }); } procedure TMainForm.UniDBMemo1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'cmenu' then UniPopupMenu1.Popup(StrToInt(Params.Values['x']),StrToInt(Params.Values['y']), Sender); end; Quote Link to comment Share on other sites More sharing options...
GerhardV Posted September 15, 2018 Share Posted September 15, 2018 Peter, just a question. Why a popup menu on a memo field? You could also add a menu button next to, or above the memo...which will result in one less network trip, unless you need to dynamically populate the popup menu. Quote Link to comment Share on other sites More sharing options...
mierlp Posted October 2, 2018 Author Share Posted October 2, 2018 Hi I was out for a 14 days vacantion on the Dominican Republik so no time to develop @Sherzod : Thanks ..this works fine @GerhardV : i have several options for the user for this dbmemo field...default 2 options, but sometimes 4 or 6 and then buttons is to much. I did try it with buttons..but i want 1 solution for every dbmemo field i use..or buttons or popup...see attachment Quote Link to comment Share on other sites More sharing options...
Ron Posted October 3, 2018 Share Posted October 3, 2018 A typical challenge, and the downside of a context menu is that you have to know about it, as it is not visible at the outset. Buttons with text makes it difficult to build a dynamic menu, but then you have toolbars which give more flexibility. A vertical toolbar with only icons initially, where it expands to a menu horisontally with text at hovering...aligned right. I see the need to put icon buttons into a memo field, like the editors. 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.