Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3967154
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:41:11+00:00 2026-05-20T03:41:11+00:00

I would like to put text and clickable icons in the headers in my

  • 0

I would like to put text and clickable icons in the headers in my panels, like this:
enter image description here

I’ve found some old hacks from 2008 to do this, but can imagine that the newer versions of ExtJS allow you to put text and icons in panel headers in a more straightforward way.

What is the most straight-forward way to put text and clickable icons in a Ext.Panel header?

Addendum

thanks @Stefan that worked, here’s my solution:

enter image description here

Javascript:

var grid_shopping_cart = new Ext.grid.GridPanel({
    headerCfg: {
        tag: 'div',
        cls: 'x-panel-header',
        children: [
            { tag: 'div', cls: 'panel_header_main', 'html': 'Shopping Cart' },
            { tag: 'div', cls: 'panel_header_icon1', 'html': '<img src="images/icon_plus.png" />' },
            { tag: 'div', cls: 'panel_header_extra', 'html': 'Order Number: 2837428347' }
        ]
    },
    width: 600,
    height: 390,
    ...
    listeners: {
        'afterrender' : function(p) {
            p.header.on('click', function(e, h) {
                alert('you clicked the plus');
            }, p, {
                delegate: '.panel_header_icon1',
                stopEvent: true
            });
        },
        ...

CSS:

div.panel_header_main {
    text-align: left;
    float: left;
}

div.panel_header_extra {
    text-align: left;
    float: right;
    margin-right: 10px;
}

div.panel_header_icon1 {
    text-align: right;
    float: right;
    margin-left: 3px;
    cursor: hand;
    cursor: pointer;
}

div.panel_header_icon2 {
    text-align: right;
    float: right;
    margin-left: 3px;
    cursor: hand;
    cursor: pointer;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:41:12+00:00Added an answer on May 20, 2026 at 3:41 am

    Perhaps you can use the headerCfg configuration option of the Ext.Panel:

    ...,
    headerCfg: {
        tag: 'div',
        cls: 'x-panel-header',
        children: [
            { tag: 'div', cls: 'my-title', 'html': 'Shopping Cart' },
            { tag: 'div', cls: 'my-status', 'html': 'Status: on <img src="status.png" />' }
        ]
    },
    ...
    

    The clickable behavior must be added in the afterrender event for example:

    function(p) {
        p.header.on('click', function(e, h) {
        }, p, {
            delegate: '.my-status',
            stopEvent: true
        });
    }
    

    You’ll need some css to style the header of course…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to put some help text in this form. class ItemForm(forms.ModelForm): alternative_id
I would like to put a button inside text like this one: some text1
I have text file with some stuff that i would like to put into
This XAML makes text fade in when it appears. I would like to put
I would like to know how to put text into the clipboard like some
I would like to put some extra merged cells for grouping reasons on the
I have a large text file I would like to put on my ebook-reader,
I would like to put an int into a string . This is what
I would like to put data from table into highcharts piechart. The table will
I would like to put text inside a bubble, and I want that my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.