estrify Posted May 17, 2013 Share Posted May 17, 2013 (edited) Hi, This is a sample of how to use tool buttons in form's title. Regards, 20191219_Tools_Usage_Demo.rar Edited December 19, 2019 by estrify Updated to work with UniGUI 1.90.0.1514 3 Quote Link to comment Share on other sites More sharing options...
Mediv07 Posted May 17, 2013 Share Posted May 17, 2013 Cool, Thanks Quote Link to comment Share on other sites More sharing options...
Semper Posted May 17, 2013 Share Posted May 17, 2013 Just another little brilliant! Thanks! Quote Link to comment Share on other sites More sharing options...
albertovesx Posted May 17, 2013 Share Posted May 17, 2013 Thank you. Nice tip Quote Link to comment Share on other sites More sharing options...
bruno-pere Posted May 17, 2013 Share Posted May 17, 2013 Nice!!!! Clean!!!! Thx! Bruno Quote Link to comment Share on other sites More sharing options...
movedown Posted May 20, 2013 Share Posted May 20, 2013 Nice!!! Thx!! Quote Link to comment Share on other sites More sharing options...
David Oliveira Posted June 4, 2014 Share Posted June 4, 2014 Hi, Very cool, In unigui beta version 0.95.0.1046 not work, so based on that, I made a small adjustment to function properly: In the Form ClientEvents.UniEvents Create a beforeInit event, the contents of this event should look like this: function window.beforeInit(sender) { Ext.apply (sender, { tools: [{ type: 'pin', tooltip: 'tooltip of pin', handler: function(event, toolEl, panel){ ajaxRequest(sender, 'tool', [ 'btn=pin' ] ); } }, { type: 'refresh', tooltip: 'tooltip of refresh', handler: function(event, toolEl, panel){ ajaxRequest(sender, 'tool', [ 'btn=refresh' ] ); } },{ type: 'search', tooltip: 'tooltip of search', handler: function(event, toolEl, panel){ ajaxRequest(sender, 'tool', [ 'btn=search' ] ); } },{ type: 'save', tooltip: 'tooltip of save', handler: function(event, toolEl, panel){ ajaxRequest(sender, 'tool', [ 'btn=save' ] ); } }] }); } And OnAjaxEvent event look like this: procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if EventName='tool' then ShowMessage('Button '+Params.Values['btn']+' pressed'); end; I have helped those who had the same problem I had. Hugs! Quote Link to comment Share on other sites More sharing options...
estrify Posted December 19, 2019 Author Share Posted December 19, 2019 Updated to work with UniGUI 1.90.0.1514 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.