tags:

views:

18

answers:

2

I am wondering can qx.ui.form.TextArea be resized by mouse at runtime? just as I can re-height question box in stackoverflow.

+2  A: 

Hey,

sure thats possible. It depends on the outer layout you use. Take a look at the following code example [1].

var win = new qx.ui.window.Window("First Window");
win.setWidth(300);
win.setHeight(200);
win.setShowMinimize(false);

this.getRoot().add(win, {left:20, top:20});
win.open();

win.setLayout(new qx.ui.layout.Canvas());
win.add(new qx.ui.form.TextArea(), {edge: 0});​

It adds a textarea to a window containing a canvas layout. The Layout property edge : 0 keeps the textarea stick to the edges of the window. Resizing the window now also resizes the textarea. The same can be done without a window.

Regards, Martin

[1] http://tinyurl.com/2wc5h4u

Martin Wittemann
its good example to auto resize widgets with outer layout but I was interested to resize textarea with mouse. Chirstian suggests an accurate solution.
Andria Jones
+2  A: 

Hi,

have also a look ate the Resizer Demo: http://demo.qooxdoo.org/current/demobrowser/#widget~Resizer.html

Regards, Chris

Christian Hagendorn
This is what I was looking for. Thank you
Andria Jones