Here is code from my custom Crosstab - headerCellrenderer. Sizing will need adjustments. Please note that the hosting page would need to have font defined as symbol headerFont. Also, for headers createChildren is really setValue:
 
import mx.core.UIComponent;
 

class crosstab.RotatedText extends UIComponent {
 
 var lbl : MovieClip;
 var listOwner : MovieClip; // the reference we receive to the list
 var getCellIndex : Function; // the function we receive from the list
 var getDataLabel : Function; // the function we receive from the list
 static var fixedFont:TextFormat = null;
 
  public function createChildren(Void):Void {
   if (fixedFont == null) {
  fixedFont = new TextFormat();
  fixedFont.font = "headerFont";
  fixedFont.align = "center";
  fixedFont.size = 11;
 
 }
 
// lbl.measure();
  }
 

 // setSize is implemented by UIComponent and calls size(), after setting
 // __width and __height
 function setValue(str:String, item:Object, sel:Boolean) : Void
 {
 var lines = str.split("\n");
 this.createTextField("lbl", 0, 0,  0, 140, 16 * (lines.length + 1));
      lbl.wordWrap = false;// true;
   lbl.embedFonts = true;
 
     lbl.setTextFormat(fixedFont);
 
  lbl.text =  str;
  lbl.setTextFormat(fixedFont);
     lbl._rotation=-90;
  size();
 }
 function size():Void {
  super.size();
  lbl._y = 70;
 }
}
 
 
HTH,
Anatole Tartakovsky

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of João Fernandes
Sent: Friday, January 27, 2006 12:31 PM
To: [email protected]
Subject: RE: [flexcoders] Datagrid headerRenderer (Flex 1.5)

What I need (and it must be done in Flex 1.5) its that my column header text to be written not from left-to-right (conventional way) but from bottom-to-top (like if you rotate all the text - 90º).

João Fernandes
Secção de Desenvolvimento
Departamento de Informática
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani
Sent: sexta-feira, 27 de Janeiro de 2006 17:25
To: [email protected]
Subject: Re: [flexcoders] Datagrid headerRenderer (Flex 1.5)

On 1/27/06, João Fernandes <[EMAIL PROTECTED]> wrote:

> Does anyone know a way to set a header for a column vertically  using a
> headerRender (I guess this will be the only way) ?

I don't think that's possible.  You're looking for row headers on the
left, right?

[side] In Flex2 there's column-locking which can give the effect of a
row header.  Just lock the first column and it becomes a header.
[/side]


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to