How to resize/reposition an existing text area on a form?

I wish to resize/reposition an existing text area on a form.

I understand that JSField methods x, y, width & height are to be used. However, I don’t know how to define the following JSDoc handle properly.

/** @type {JSField} */
var _jsfield_handle = …

The easiest way to do that is to just use the .setLocation() and .setSize() functions of your element.
Make sure the textarea has it’s name property filled in and then you can do for example:

elements.yourelementname.setSize(300, 300);

Another option is to use the solutionModel and that’s what you’re trying in your example.
To do that, the code should be something like:

var jsForm = solutionModel.getForm("yourformname");
var jsField = jsForm.getField("yourelementname");
jsField.width = 300;
jsField.height = 300;
controller.recreateUI();

For more info about the solutionModel see: http://wiki.servoy.com/display/public/D … tion+Model

Joas,

Thanks. It’s so simple when you know how…