Hi Koen! On Mon, Jan 5, 2015 at 3:22 AM, Koen Deforche <k...@emweb.be> wrote: > Hey, > > I would do this with a small snippet of JavaScript code; e.g. a single > function that you can call with a line edit and a text.
Yes, doing this with javascript sounds like the right way to go. (As I understand it, the animation would then be carried out on the client side -- that is, by the browser executing the javascript.) > fillAnimate(edit, text) { ... } > > This code itself could use JavaScipt setTimeout() to perform the animation. > > You can put this file in a JS file which you load using > WApplication::require(), and then you can use it for a particular line edit: > > WLineEdit *ed = ... ; > WString text = ... ; > > ed->doJavaScript("fillAnimate(" + ed->jsRef() + ", " + > text.jsStringLiteral() + ");"); Thanks for sketching out some of the details. I will experiment with this approach some time in the future. I did implement a solution where I scheduled a sequence of WTimer::singelShot calls spaced a few hundred milliseconds apart that update the text so as to add one character at a time. But it does seem "heavyweight" to orchestrate this animation on the server, rather than pushing the processing to the browser. > Regards, > koen Thanks for your feedback. K. Frank > 2015-01-01 20:10 GMT+01:00 K. Frank <kfrank2...@gmail.com>: >> >> Hello List! >> >> What would be a good way -- the Wt way -- to animate filling >> in a WLineEdit? What I have in mind is having code write >> characters to the WLineEdit (and display them) one by one >> at a rate of three or four characters per second. >> ... ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ witty-interest mailing list witty-interest@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/witty-interest