bbm Posted December 13, 2016 Posted December 13, 2016 Hi, does anybody know how to change the order of Tabs in a PageControl at runtime by Drag & Drop? Best regards Quote
Sherzod Posted December 13, 2016 Posted December 13, 2016 Hi, Try this: http://forums.unigui.com/index.php?/topic/4413-draggable-tabs/&do=findComment&comment=21792 Best regards. Quote
bbm Posted December 13, 2016 Author Posted December 13, 2016 Many thanks, it's working fine. Is it possible to get an event when the order has changed? Best regards Quote
Sherzod Posted December 14, 2016 Posted December 14, 2016 Hi, Is it possible to get an event when the order has changed? Try: function tabPanel.beforeInit(sender, config) { config.plugins = [Ext.create('Ext.ux.TabReorderer', { listeners: { Drop: function(tabpanel, container, dragCmp, startidx, idx, eOpts) { // } } })]; } Best regards. Quote
bbm Posted December 15, 2016 Author Posted December 15, 2016 Thank you, works good. Best regards. Quote
bbm Posted December 16, 2016 Author Posted December 16, 2016 Sorry, but I have an additional question. I can get the event now, but I cannot get the new order. Any idea or solution? Best regards. Quote
Sherzod Posted December 16, 2016 Posted December 16, 2016 Hi, but I cannot get the new order. Sorry, can you clarify ?! Best regards. Quote
bbm Posted December 16, 2016 Author Posted December 16, 2016 In my application I want to save the tab order of the tabs for each operator. With the drag & drop I want to give the operator an easy way to change the tab order himself. In this case it would be nice to have any possibility to recognize the last tab order. Best regards Quote
Sherzod Posted December 16, 2016 Posted December 16, 2016 Maybe like this?!: function tabPanel.beforeInit(sender, config) { config.plugins = [Ext.create('Ext.ux.TabReorderer', { listeners: { Drop: function(tabpanel, container, dragCmp, startidx, idx, eOpts) { ajaxRequest(sender, '_tabOrderChange', ['startidx='+startidx, 'idx='+idx]); } } })]; } procedure TMainForm.UniPageControl1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_tabOrderChange' then begin ShowMessage(Params.Values['startidx'] + ';' + Params.Values['idx']); end; end; Quote
bbm Posted December 16, 2016 Author Posted December 16, 2016 Thank you, you make a great job. Many thanks for your really quick support!!!!! Best regards. Quote
easegura777 Posted April 28, 2021 Posted April 28, 2021 On 12/16/2016 at 3:31 AM, Sherzod said: Maybe like this?!: function tabPanel.beforeInit(sender, config) { config.plugins = [Ext.create('Ext.ux.TabReorderer', { listeners: { Drop: function(tabpanel, container, dragCmp, startidx, idx, eOpts) { ajaxRequest(sender, '_tabOrderChange', ['startidx='+startidx, 'idx='+idx]); } } })]; } procedure TMainForm.UniPageControl1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_tabOrderChange' then begin ShowMessage(Params.Values['startidx'] + ';' + Params.Values['idx']); end; end; In the V1.90.0.1547 not show beforeinit Quote
easegura777 Posted April 28, 2021 Posted April 28, 2021 4 hours ago, Sherzod said: ClientEvents -> UniEvents Thank you!!! Muchas gracias 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.