Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

131
Visualizações
Extjs6 How to handle overflow for Panel Header items

I want to handle overflow for panel header items .when the number of buttons exceed the screen width the collapse icon and buttons are not visible. I want to make the header scrollable or show the overflow items in a dropdown menu.

Ext.application({
    name : 'Fiddle',

    launch : function() {
        Ext.onReady(function () {
            Ext.create('Ext.panel.Panel', {
                width: 200,
                height: 50,
                collapsible: true,
                renderTo: Ext.getBody(),
                title: 'title',
                layout : 'hbox',
                header: {
 
                    title: {
                        text: 'title',
                        flex: undefined
                    },
                        items: [{
                            xtype: 'button',
                            text: 'test',
                            margin: '0 10'
                        },{
                            xtype: 'button',
                            text: 'test',
                            margin: '0 10'
                        },{
                            xtype: 'button',
                            text: 'test',
                            margin: '0 10'
                        },{
                            xtype: 'button',
                            text: 'test',
                            margin: '0 10'
                        },{
                            xtype: 'button',
                            text: 'test',
                            margin: '0 10'
                        },{
                xtype:'tbfill'
            }]
                }
            });
        });
    }
});

Please refer to the below image-
enter image description here

It should look like this-
enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can get the desired result using an Ext.toolbar.Toolbar, it has an overflowHandler config which you can set to menu. Try this:

Ext.application({
    name: 'Fiddle',
    launch: function () {
        Ext.onReady(function () {
            Ext.create('Ext.toolbar.Toolbar', {
                width: 200,
                renderTo: Ext.getBody(),
                overflowHandler: 'menu',
                items: [{
                    xtype: 'component',
                    html: 'title'
                },{
                    xtype: 'button',
                    text: 'test1'
                }, {
                    xtype: 'button',
                    text: 'test2'
                }, {
                    xtype: 'button',
                    text: 'test3'
                }, {
                    xtype: 'button',
                    text: 'test4'
                }, {
                    xtype: 'button',
                    text: 'test5'
                }]
            });
        });
    }
});
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda