5

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 Answers2

3

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

Regards, Chris

2

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

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

Cyril Gandon
  • 16,830
  • 14
  • 78
  • 122
Martin Wittemann
  • 2,109
  • 1
  • 12
  • 14
  • 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 Aug 20 '10 at 18:22