picyka Posted July 25, 2025 Posted July 25, 2025 Is there a component similar to TUniPopupMenu that could be used on mobile? Or any suggestions on how to do it? Quote
picyka Posted July 25, 2025 Author Posted July 25, 2025 UnimMenu -> Would it be possible to open it in the center of the screen? Quote
Sherzod Posted July 29, 2025 Posted July 29, 2025 On 7/25/2025 at 7:03 PM, picyka said: Is there a component similar to TUniPopupMenu that could be used on mobile? Or any suggestions on how to do it? Hello, Could you clarify when and how the menu is expected to appear? Quote
Sherzod Posted July 29, 2025 Posted July 29, 2025 One possible solution: 1. MainmForm.ClientEvents.ExtEvents [form] -> function form.painted(sender, eOpts) { this.bodyElement.on('longpress', function(e) { Ext.create('Ext.menu.Menu', { items: [{ text: 'Open', iconCls: 'x-fa fa-folder-open', handler: function() { ajaxRequest(sender, 'menuClick', { mn: 'open' }); } }, { text: 'Save', iconCls: 'x-fa fa-save', handler: function() { ajaxRequest(sender, 'menuClick', { mn: 'save' }); } }, { text: 'Delete', iconCls: 'x-fa fa-trash', handler: function() { ajaxRequest(sender, 'menuClick', { mn: 'delete' }); } } ] }).showAt(e.getX(), e.getY()); }); } 2. MainmForm.OnAjaxEvent -> procedure TMainmForm.UnimFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = 'menuClick' then begin if Params.Values['mn'] = 'open' then ShowMessage('Open') else if Params.Values['mn'] = 'save' then ShowMessage('Save') else if Params.Values['mn'] = 'delete' then ShowMessage('Delete'); end; end; Quote
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.