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 Link to comment Share on other sites More sharing options...
Mediv07 Posted May 17, 2013 Share Posted May 17, 2013 Cool, Thanks 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! Link to comment Share on other sites More sharing options...
albertovesx Posted May 17, 2013 Share Posted May 17, 2013 Thank you. Nice tip 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 Link to comment Share on other sites More sharing options...
movedown Posted May 20, 2013 Share Posted May 20, 2013 Nice!!! Thx!! 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! 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now