• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1436
  • Last Modified:

thunderbird adding a view column

I wanted to know how to add a new column to messages view, like we do in Microsoft outlook. In outlook, we can customize the current view as View->Arrange By->Current View->Customize current view... and we can select the fields to add to view. I understand I need to write a chrome to do that, but don't know which file I should extend?
  • 5
  • 3
1 Solution
Marc ZCommented:
Before you start creating something you might not need, have you checked (when in the mailbox folder of your choice) in the View->Sort By to see if your Customized view has already been set as an option?
Marc ZCommented:
According to http://kb.mozillazine.org/Message-list_columns
you can install this add-on and it may do what you desire.
Ajay-SinghAuthor Commented:
> https://addons.mozilla.org/en-US/thunderbird/addon/2516
I tried that. It doesn't do what I need. It just changes the message display pane to show extra headers.

May be I was not clear earlier...
I want to add the custom headers (outside the predefined ones) as one of the columns on the message view pane and I want to sort by that too...
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Marc ZCommented:
I understand.  I cannot help showing the custom headers, because  I don't know how to.

Sorry if I wasted your time. Perhaps someone else can help you on this one.

Maybe this page will help,
Ajay-SinghAuthor Commented:

The links you have given is very informative. I have written the overylay and js. Unfortunately, its not working. Can you check and let me know if everything is ok here?
xul file:
<?xml version="1.0"?>
<overlay xmlns:html="http://www.w3.org/1999/xhtml"
	<script src="a.js"/>
	<stringbundle id="bundle_fpse" src="chrome://global/locale/fpse.properties"/>
	<tree id="threadTree">
		<treecols id="threadCols">
			<splitter class="tree-splitter"/>
			<treecol id="colReplyTo" persist="hidden ordinal width"
				currentView="unthreaded" flex="2" label="Reply-To"
				tooltiptext="Click to sort by the Reply-To header"/>
var columnHandler = {
   getCellText:         function(row, col) {
      //get the message's header so that we can extract the reply to field
      var key = gDBView.getKeyAt(row);
      var hdr = gDBView.db.GetMsgHdrForKey(key);
      return hdr.getStringProperty("replyTo");
   getSortStringForRow: function(hdr) {return hdr.getStringProperty("replyTo");},
   isString:            function() {return true;},
   getCellProperties:   function(row, col, props){},
   getRowProperties:    function(row, props){},
   getImageSrc:         function(row, col) {return null;},
   getSortLongForRow:   function(hdr) {return 0;}
//gDBView.addColumnHandler("colReplyTo", columnHandler);
window.addEventListener("load", doOnceLoaded, false);
function doOnceLoaded() {
  var ObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
  ObserverService.addObserver(CreateDbObserver, "MsgCreateDBView", false);
var CreateDbObserver = {
  // Components.interfaces.nsIObserver
  observe: function(aMsgFolder, aTopic, aData)
function addCustomColumnHandler() {
   gDBView.addColumnHandler("colReplyTo", columnHandler);

Open in new window

Marc ZCommented:
Sorry, Ajay-Singh,

I don't know how to read code.  Perhaps these guys over at this forum may be of assistance.
http://forums.mozillazine.org/viewforum.php?f=50 or
Ajay-SinghAuthor Commented:
Sure, I was wondering if somebody else from this forum can help me out on this?
Sorry I'm a latecomer on this, but I encountered this thread while trying to solve the same problem.   If I understand the problem correctly, I have now found a much simpler solution.  My Thunderbird is v2.0, and there is a button on the far right of the column headings whose tool tip is "Click to select columns to display."
Marc ZCommented:
Sorry CharlieL, he wanted to create a Custom Header and sort by it, not one of the predefined one.

I want to add the custom headers (outside the predefined ones) as one of the columns on the message view pane and I want to sort by that too...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now