|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
|
|
Memo autoscroll and chat applicationHi, i have some question... 1. I want to build a chat application. So I have a window with textarea and textfield. But i have some problem. Every i add a new line to my text area, the text area doesn't auto scroll.. How to make textarea autoscroll? The other problem is i can't clear the text in the textfield (I use command textfield.setValue("")). So every I press enter, I want to clear the textfield and move the value to the textarea. But the textfield can't be cleared. Hot to clear the textfield value? 2. Are there any qooxdoo chat application in the internet ? Thank you very much ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Memo autoscroll and chat applicationjhonny thio wrote:
> Hi, i have some question... > > 1. I want to build a chat application. So I have a window with > textarea and textfield. > But i have some problem. Every i add a new line to my text area, > the text area doesn't auto scroll.. > How to make textarea autoscroll? Try <textarea>.setOverflow("auto"). > The other problem is i can't clear the text in the textfield (I use > command textfield.setValue("")). So every > I press enter, I want to clear the textfield and move the value to > the textarea. But the textfield can't > be cleared. Hot to clear the textfield value? See http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField~value. You might want to toggle "liveUpdate" when you encounter an Enter key and send a synthetic key event to force the change. Or you use .getInputElement() and manipulate the input element directly. > > 2. Are there any qooxdoo chat application in the internet ? None that I'm aware of!? Thomas > > Thank you very much > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@... > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Memo autoscroll and chat applicationHi,
I thing that thron7 is right, setting liveUpdate property to true can help you with this <textfield>.setLiveUpdate(true); Consider using HtmlEmbed instead of text area, text area can display only text ;-) 2008/7/15 thron7 <thron7@...>:
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
|
|
|
Re: Memo autoscroll and chat applicationHi, I have the same problem. How to scroll to bottom. This trick (working in pure js+html): <textarea>.setScrollTop(<textarea>.getScrollHeight()); should works, but it does not. Have you got any answer? BR Dominik |
|
|
Re: Memo autoscroll and chat applicationjhonny thio wrote:
> I have tried <textarea>.setOverflow("auto"), but this command doesn't > work. > > Maybe I must tell again about my problem... > Every I pressed enter in my textfield, the textfield.value will move > to textarea. > If the textarea.value has bigger than the textarea size, will be shown > a scroll bar. > My problem is although there is a scroll bar, but the focus of the > textarea still in a first line.. > so if I want read the newest line, I must scroll manual the focus to > the the most bottom line. > > so how I can make my textarea always focus to the new line? Ah, now I'm getting at it ... try to set scrollTop = scrollHeight with every update on your TextArea. T. > > ----- Original Message ---- > From: Petr Kobalíček <kobalicek.petr@...> > To: qooxdoo Development <qooxdoo-devel@...> > Sent: Tuesday, July 15, 2008 12:09:58 PM > Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application > > Hi, > > I thing that thron7 is right, setting liveUpdate property to true can > help you with this > > <textfield>.setLiveUpdate(true); > > Consider using HtmlEmbed instead of text area, text area can display > only text ;-) > > 2008/7/15 thron7 <thron7@... > <mailto:thron7@...>>: > > jhonny thio wrote: > > Hi, i have some question... > > > > 1. I want to build a chat application. So I have a window with > > textarea and textfield. > > But i have some problem. Every i add a new line to my text area, > > the text area doesn't auto scroll.. > > How to make textarea autoscroll? > > Try <textarea>.setOverflow("auto"). > > > The other problem is i can't clear the text in the textfield > (I use > > command textfield.setValue("")). So every > > I press enter, I want to clear the textfield and move the > value to > > the textarea. But the textfield can't > > be cleared. Hot to clear the textfield value? > > See > http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField~value > <http://demo.qooxdoo.org/current/apiviewer/#qx.ui.form.TextField%7Evalue>. > You might want to toggle "liveUpdate" when you encounter an Enter key > and send a synthetic key event to force the change. Or you use > .getInputElement() and manipulate the input element directly. > > > > > 2. Are there any qooxdoo chat application in the internet ? > > None that I'm aware of!? > > Thomas > > > > > Thank you very much > > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & win > great prizes > > Grand prize is a trip for two to an Open Source event anywhere > in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > qooxdoo-devel mailing list > > qooxdoo-devel@... > <mailto:qooxdoo-devel@...> > > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@... > <mailto:qooxdoo-devel@...> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@... > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
|
|
|
Re: Memo autoscroll and chat applicationhi my solution, without using a qx.ui.form.TextArea.[set|get]Scroll[...], is: var t = new qx.ui.embed.HtmlEmbed("<textarea id='db_001'></textarea>"); somewidget.add(t); var v = document.getElementById('db_001'); and in a callback just I do: v.scrollTop = v.scrollHeight; it's working perfectly with <textarea> ale also with <div> and should with any other scrollable elements. best regards dominik |
|
|
Re: Memo autoscroll and chat applicationHi Jhonny!
The problem is that the "scrollTop" property is applied on the widget's div element. At the moment we have no getter or setter for the "scrollTop" or "scrollLeft" property of htmlarea elements. As workaround you can set the value on the htmlarea directly (here for qooxdoo 0.7.x): this._TextArea.getElement().firstChild.scrollTop = 200; Cheers, Jonathan -----Original Message----- From: qooxdoo-devel-bounces@... on behalf of jhonny thio Sent: Wed 7/16/2008 4:24 PM To: qooxdoo Development Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application I have tried : this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in every I update my textarea. this is my code : reqOpen.addEventListener("completed", function(e) { var isi = this._TextArea.getValue(); isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent(); this._TextArea.setValue(isi); this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); }, this); it doesn't work. any other step ? ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
|
|
|
Re: Memo autoscroll and chat applicationjhonny thio wrote:
> Only this._TextArea.getElement().firstChild.scrollTop = 200; ? > it also doesn't work. You can see my code below : > > reqOpen.addEventListener("completed", function(e) > { > var isi = this._TextArea.getValue(); > isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent(); > this._TextArea.setValue(isi); > this._TextArea.getElement().firstChild.scrollTop = 200; > }, this); > > If have filled my textarea with a large mount of text, but it doesn't > scroll to bottom. > Any other command ? Have you experimented? Tried offsets other than 200, e.g. 10,000?! I'd suggest to do try this way this._TextArea.getElement().firstChild.scrollTop = this._TextArea.getElement().firstChild.scrollHeight; but I strongly recommend doing a bit of reading about these attributes and methods. Try things out in Firebug! Thomas > > > > ----- Original Message ---- > From: Jonathan Rass <Jonathan.Rass@...> > To: qooxdoo Development <qooxdoo-devel@...> > Sent: Wednesday, July 16, 2008 8:40:58 AM > Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application > > Hi Jhonny! > > > The problem is that the "scrollTop" property is applied on the > widget's div element. At the moment we have no getter or setter for > the "scrollTop" or "scrollLeft" property of htmlarea elements. > As workaround you can set the value on the htmlarea directly (here for > qooxdoo 0.7.x): > > this._TextArea.getElement().firstChild.scrollTop = 200; > > > Cheers, > Jonathan > > -----Original Message----- > From: qooxdoo-devel-bounces@... > <mailto:qooxdoo-devel-bounces@...> on behalf of > jhonny thio > Sent: Wed 7/16/2008 4:24 PM > To: qooxdoo Development > Subject: Re: [qooxdoo-devel] Memo autoscroll and chat application > > I have tried : > this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); in > every I update my textarea. > > this is my code : > > reqOpen.addEventListener("completed", function(e) > { > var isi = this._TextArea.getValue(); > isi = isi + "\n" +mySentence+"\n"+ e.getData().getContent(); > this._TextArea.setValue(isi); > this._TextArea.setScrollTop(this._TextArea.getScrollHeight()); > }, this); > > it doesn't work. any other step ? > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@... > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Memo autoscroll and chat applicationdblacha wrote:
> jhonny thio wrote: > >> I have tried <textarea>.setOverflow("auto"), but this command doesn't >> work. >> >> Maybe I must tell again about my problem... >> Every I pressed enter in my textfield, the textfield.value will move to >> textarea. >> If the textarea.value has bigger than the textarea size, will be shown a >> scroll bar. >> My problem is although there is a scroll bar, but the focus of the >> textarea still in a first line.. >> so if I want read the newest line, I must scroll manual the focus to the >> the most bottom line. >> >> so how I can make my textarea always focus to the new line? >> >> >> > > Hi, I have the same problem. How to scroll to bottom. > This trick (working in pure js+html): > <textarea>.setScrollTop(<textarea>.getScrollHeight()); > should works, but it does not. > > Have you got any answer? > I think this has been answered by Jonathan. T. > BR > Dominik > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@... https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel |
|
|
Re: Memo autoscroll and chat applicationdblacha |