If you have the Flex 2.0 Beta, the architecture has changed
completely from AS2. You can read about them in the "Developing Flex
Applications" book, available here: http://labs.macromedia.com/wiki/index.php/Flex:Release_Notes#Beta_1_documentation
The chapters you want are "Using Cell Renderers and Cell
Editors" at http://livedocs.macromedia.com/flex/20beta1/docs/00001063.html
and "Working with Cell Editors" at http://livedocs.macromedia.com/flex/20beta1/docs/00001096.html
Stephen From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harald Dehn Sent: Friday, March 03, 2006 10:20 AM To: flexcoders@yahoogroups.com Subject: AW: [flexcoders] Coustom cellRenderer in AS3 for a DataGrid Hi here ist the
sourcecode I am experimenting with
Unfortunealy the setValue function (I found
a lot of examples for flash 8) doesnt work with AS3. Do have any
idea? Regards, Harry package
CellRenderer {
import mx.controls.Image;
import mx.controls.Label;
import mx.containers.HBox;
import mx.core.IDataObject;
public class KundeCellRenderer extends HBox {
[Embed(source="Kunde.png")]
public static const cKundeImage:Class;
[Embed(source="Kunde_Del.png")]
public static const cKundeDeleteImage:Class;
private var _Icon:Image;
private var _Label:Label;
private var _DataObject:Object;
public function setValue(str:String, item:Object, sel:Boolean):void
{
_Label.text = item.KundenName;
}
protected override function createChildren():void {
super.createChildren();
this.setStyle("verticalAlign", "middle");
this.setStyle("marginLeft", 6);
_Icon = new Image();
_Icon.source = KundeCellRenderer.cKundeImage;
this.addChild(_Icon);
_Label = new Label();
// _Label.text = "1234";
this.addChild(_Label);
}
public function KundeCellRenderer() {
}
} } Von:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von jeremy lu what you want to do with it
? On 3/3/06, harald_dehn <[EMAIL PROTECTED]>
wrote: Hello, -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Coustom cellRenderer in AS3 for a DataGrid Stephen Gilson