-
10 Dec 2009 8:34 PM #1
Panel Title Font Size
Panel Title Font Size
I want to change the font size of the text displayed in the panel title bar.
I need to do this only on a specific instance panel so, I can't override the .x-panel-header (not sure the exact classname) as this will make all my other panels change their title font.
I thought about overridding a Ext.Panel but I have no idea what to do should I choose to override the rendering mechanism.
Please help/point me to the right direction.
Thank you.
-
10 Dec 2009 10:51 PM #2
Solved
Solved
I wish I can just erase my post. The solution was very simple I jsut inserted a markup on my panel title
from:
title : 'Some Title'
to:
title : '<font style="font-size: 18px;">Some Title</font>
-
17 Jan 2011 10:23 AM #3
Nonsense :-) Still useful for others, like me.
-
10 May 2011 2:52 PM #4
Your answer helped me as well. Thank You for taking the time to post it

-
27 Aug 2012 5:26 AM #5
Very useful lets me create a dynamically sizing title. Thank you for posting.
Here is some simple logic to handle title sizing in the bar.
Code:this.getWhatCategoryView().setTitle( this.calcFontSize( data.get("Title"), 20 ) ); // create a nice way to fit title on to the screen // calcFontSize : function( titleToDisplay, checkwidth ) { var ilen = titleToDisplay.length; var fontsize = 1; if ( checkwidth == undefined || checkwidth == null) { checkwidth = 30; } if ( ilen < 10 ) { fontsize = 1; } else if ( ilen < checkwidth ) { fontsize = .84; } else { fontsize = .55; } return '<font style="font-size:' + fontsize + 'em;">' + titleToDisplay '</font>'; },


Reply With Quote