# addEventListener to ClassFactory?

**URL:** https://forum.kirupa.com/t/addeventlistener-to-classfactory/269234
**Category:** flash
**Created:** [August 25, 2008, 6:07am UTC](https://forum.kirupa.com/t/addeventlistener-to-classfactory/269234 "2008-08-25T06:07:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Kenwio](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@Kenwio](https://forum.kirupa.com/u/Kenwio)
#### Post date: [August 25, 2008, 6:07am UTC](https://forum.kirupa.com/t/addeventlistener-to-classfactory/269234/1 "2008-08-25T06:07:16Z")

</div>

I would like to add an eventlistener to var1 here directly, without having to create a new component/class…

```auto
var var1:ClassFactory = new ClassFactory( TextInput );
var1.properties = { width : 200, width : 300}; 
dataGridCol.itemRenderer = var1;

```

Reason being that I would like the itemRenderer to be in the same file as the rest of the DataGrid…

Is this possible somehow??
