Hi Dietrich,
> try
>
> this.input_field.setTextSelection(0,0)
Thanks for the tip. The scroll to top works fine.
However, to have the blinking cursor shown, I had to set the enabled to
false prior to setting data or have the read-only as false.
I'm on trunk 20621 and I tested this with ff 3.5.5 on karmic. In the
snippet below, if enabled false during the creation is changed to true,
the cursor doesn't appear. However, if enabled is set to false, or if
read-only is set to false, the cursor appears fine.
My code is:
>
> APP = this;
> APPROOT = this.getRoot();
> this.input_field = new qx.ui.form.TextArea().set({
> minHeight: 400,
> minWidth: 500,
> enabled: false
> });
> this.result = "i'm a really long msg";
> for(i=0;i<100;i++) {
> this.result += "\ni'm a really long msg"
> }
> this.button = new qx.ui.form.Button("populate and focus");
> this.button.addListener("execute", function(e) {
> this.input_field.setEnabled(true);
> this.input_field.setValue(this.result);
> this.input_field.setReadOnly(true);
> this.input_field.setFocusable(true);
> this.input_field.setTextSelection(0,0);
> this.input_field.focus();
> }, this);
> this.clear_button = new qx.ui.form.Button("clear and disable");
> this.clear_button.addListener("execute", function(e) {
> this.input_field.resetValue();
> this.input_field.setEnabled(false);
> }, this);
>
> APPROOT.add(this.button, {top:10, left: 10});
> APPROOT.add(this.clear_button, {top:10, left: 200});
> APPROOT.add(this.input_field, {top:100, left: 10});
cheers,
skar.
--
--
The life so short, the craft so long to learn.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel