Adjust Templates in Repeater

I’m trying to change the size of each template in a repeater. For example, I want the first template to be 50 pixels, the next template to be 30, and so on. I’ve added a Template Parameter called compHeight and, since there is no way to directly change the height at runtime, I added this script in the propertyChange event on the template:

if event.propertyName == 'compHeight': system.gui.resizeComponent(event.source, 400, event.newValue)

I also added ‘compHeight’ to my Template Parameters table where my repeater resides. Is what I’m doing even possible?

Thanks

I actually tried to change the Template Parameters table during runtime and I get the following error. I assume since it is a Template and not a single container. Is there a workaround?

[quote]Null Pointer Exception
Component is not a standard container[/quote]