Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Thread Tools Rate Thread Display Modes
Old 02-14-2005, 05:21 PM   #1
Senior Member
Join Date: Apr 2004
Posts: 108
Default iconCellrenderer custom datagrid class not showing multi line code


I'm trying to make a custom cellrendering class for a datagrid that will feature multiline text and html code.

I'm having trouble with this code displaying multiline text:

ActionScript Code:
class HyperlinkCell extends UIComponent {       static var symbolName:String = "HyperlinkCell";         var text_txt : TextField;       var owner; // the row that contains this cell       var listOwner  ; // the List/grid/tree that contains this cell       private var cellData:Object;       // empty constructor     function HyperlinkCell(){}             function createChildren():Void     {         var c = createLabel("text_txt", 14);         c.styleName = listOwner;         c.selectable  = false;         c.tabEnabled = false;         c.background = false;         c.multiline    = true;         c.wordWrap  = true;         c.html        = true;   }     function size():Void {  var c = text_txt;  c._width = __width;  c._height = __height; }     function getPreferredHeight():Number{ return 22; }     function setValue(suggested:String, item:Object, selected:Boolean):Void   {       var t:TextFormat = text_txt.getTextFormat();       var nt:TextFormat = text_txt.getNewTextFormat();       text_txt.htmlText =  suggested ;       text_txt.setTextFormat(t);       text_txt.setNewTextFormat(nt);   }         private function onHyperlinkClick():Void   {       listOwner.dispatchEvent( {type: "hyperlinkClick", target: listOwner,  cell: this, text: cellData} );   }   }

I'm populating the data grid using this simple method:

ActionScript Code:
a = new Array(); a.push( { label:"<li>duh*", link:"<li> Eric is the smartest programmer it's true ljlklk adfdsffa!" }  ); a.push( { label:"<li>duh2", link:"<li>duh2 <li>" }  );   dg.dataProvider = a;

Any Ideers?
clem_c_rock is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:25 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.