开发者

Can TextArea widget be resized by mouse at runtime?

开发者 https://www.devze.com 2023-01-12 03:00 出处:网络
I am wondering can qx.ui.form.TextArea be resized by mo开发者_如何学运维use at runtime? just as I can re-height question box in stackoverflow.have also a look ate the Resizer Demo:

I am wondering can qx.ui.form.TextArea be resized by mo开发者_如何学运维use at runtime? just as I can re-height question box in stackoverflow.


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

Regards, Chris


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

0

精彩评论

暂无评论...
验证码 换一张
取 消