Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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

Posted

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;
  • 4 years later...
Posted
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

image.png.889361671ffd2c376fc0fcdbbc381980.png

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...