Re: How to make a TextArea auto-growing...?

2011-02-21 Thread Manuel Carrasco Moñino
On Fri, Feb 18, 2011 at 8:15 PM, Andy pula...@gmail.com wrote: I'm refactoring the code into gwt-traction right now, but noticing that GQuery no longer has this static method:  public static String curCSS(Element elem, String name, boolean force) Use $(elem).cur(name, force); I should be

Re: How to make a TextArea auto-growing...?

2011-02-21 Thread Andy
I just confirmed it's in there: jar tvf gwt-traction-1.2.jar | grep AutoSizingTextArea.class 4333 Fri Feb 18 17:35:22 EST 2011 com/tractionsoftware/gwt/user/ client/ui/AutoSizingTextArea.class Did you add this to your .gwt.xml? inherits

Re: How to make a TextArea auto-growing...?

2011-02-20 Thread Carlo Alberto Degli Atti
Hey guys, thank you very much for your contributions! I've quickly given a look to gwt-traction from Andy, it seems really interesting.. @Brandon I tried it with chrome, but the TextArea doesn't expand vertically... (I'm reading now that @Jeff already noted it) Thank u everybody! CA On

Re: How to make a TextArea auto-growing...?

2011-02-20 Thread Deepak Singh
Hi, I am having gwt-traction-1.2.jar, gwtquery latest jars. final AutoSizingTextArea contactText = new AutoSizingTextArea(new TextAreaWithSelection(), 40, 600); contactText.addStyleName(small); The above code gives NoClassDefinitionFound for AutoSizingTextArea. I make sure that i have correct

Re: How to make a TextArea auto-growing...?

2011-02-19 Thread Brandon Donnelson
Nice link, they do it better I think than I did. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to

How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
Hi, I've looked around but I haven't found any solution, so I post it here: how can I make a TextArea that expands its height depending on the text inside? Thanks CA -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread David Goodenough
On Friday 18 February 2011, Carlo Alberto Degli Atti wrote: Hi, I've looked around but I haven't found any solution, so I post it here: how can I make a TextArea that expands its height depending on the text inside? Thanks CA Its good to find someone else who wants this. I

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
Hi David, thank you for your answer! I will try it and I will give you my feedback :-) In my case the width is not a problem; my concern is about the height (the number of displayed rows)... best regards, CA On Feb 18, 1:11 pm, David Goodenough david.goodeno...@btconnect.com wrote: On

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Jeff Schwartz
There's a jQuery plugin that I've used in the past with good results. I imagine that its code could be a model for a gwt derived textarea widget. Unfortunately I don't have the time to do this now but if I do in the future I'll take a crack at it. I don't think it would be that difficult. On Fri,

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread David Goodenough
I have not tried it on a RichTextArea, but the principle should work on those too. David On Friday 18 February 2011, Carlo Alberto Degli Atti wrote: Hi David, thank you for your answer! I will try it and I will give you my feedback :-) In my case the width is not a problem; my concern

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
David it works (gwt2.2). But how can I set the height at rendering time (before any browser event)? On Feb 18, 1:53 pm, David Goodenough david.goodeno...@btconnect.com wrote: I have not tried it on a RichTextArea, but the principle should work on those too. David On Friday 18 February

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Sean
LinkedIn.com's Email does this, and I liked it a lot. As for setting the size before a browser event, I would give it a minimum size in Pixels. Then just let it grow as needs be from there. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
I understand it, but if the text is arbitrarily long (number of rows) how can I compute the initial size in pixels? On Feb 18, 2:10 pm, Sean slough...@gmail.com wrote: LinkedIn.com's Email does this, and I liked it a lot. As for setting the size before a browser event, I would give it a

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread David Goodenough
When you create the panel and want to render it, use:- DeferredCommand.addCommand( new Command( ) { public void execute() { textArea.rightSize( ); } }); where textArea

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Carlo Alberto Degli Atti
Thx (I'm still learning GWT...) ;-) On Feb 18, 2:34 pm, David Goodenough david.goodeno...@btconnect.com wrote: When you create the panel and want to render it, use:-                 DeferredCommand.addCommand( new Command( ) {                         public void execute() {                  

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread David Goodenough
Reading the jQuery plugin articles, this code may well not work on all browsers. There appear to be some quirks with IE (what a surprise) and Opera (don't know of that is version specific). I also do not know (I do not have a copy to test it with) whether the IE problems have gone away with

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Zak Linder
Hey, I've taken a shot at this problem with pretty good results. Check out the code here: https://gist.github.com/833873 The textarea will stretch pretty reliably as the user types/cuts/pastes text. The way it does this is by maintaining an internal representation of characters-per-line. The

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Andy
We have a good implementation of both an auto-sizing TextArea (vertical) and an auto-sizing TextBox (horizontal) that automatically adjust to the CSS specified for the box (accommodating different fonts, line-height, padding, etc). I've been meaning to share it for a while and will do it this

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Brandon Donnelson
Pixels can't be calculated in a input box, but can be calculated in a panel, at least from what I can do. I have put together some code to dynamically expand a textbox. The same could be applied to textarea, adding the height. I'll have the demo up tomorrow on my site, and I'll do textbox and

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread zixzigma
does it work with copy-and-paste scenarios ? when a user pastes a long text, will the text-area auto-grow ? paste using ctrl+v or mouse-right-click-context-menu -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Brandon Donnelson
observe the events of changes in text area, and yes, it can change size on paste. You can accurately measure the text, by putting the text in a html div, and get the divs width and height. Of course, you'll have to have a width contraint on the div, b/c you'll want to wrap the text in the div.

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Andy
I'm refactoring the code into gwt-traction right now, but noticing that GQuery no longer has this static method: public static String curCSS(Element elem, String name, boolean force) I should be close once I find its replacement. On Feb 18, 11:44 am, Andy pula...@gmail.com wrote: We have a

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Brandon Donnelson
I made a demo of textbox expanding and text area expansion. http://demogwttextexpand.appspot.com/ - demo http://code.google.com/p/gwt-examples/wiki/DemoGWTTextBoxExpander - wiki, links to source here. Brandon Donnelson http://gwt-examples.googlecode.com http://c.gawkat.com -- You received

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Andy
The AutoSizingTextArea widget is up at http://code.google.com/p/gwt-traction/ I hope you find it useful. I'm happy to accept patches if anyone wants to suggest changes. On Feb 18, 2:15 pm, Andy pula...@gmail.com wrote: I'm refactoring the code into gwt-traction right now, but noticing that

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Jeff Schwartz
Doesn't work in FFv3.6.13 scoll bar is visible and text area does not expand On Fri, Feb 18, 2011 at 6:07 PM, Brandon Donnelson branflake2...@gmail.comwrote: I made a demo of textbox expanding and text area expansion. http://demogwttextexpand.appspot.com/ - demo

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Jeff Schwartz
textarea also doesn't work in chrome v9.0.597.98 On Fri, Feb 18, 2011 at 6:09 PM, Andy pula...@gmail.com wrote: The AutoSizingTextArea widget is up at http://code.google.com/p/gwt-traction/ I hope you find it useful. I'm happy to accept patches if anyone wants to suggest changes. On Feb

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Jeff Schwartz
also doesn't work in ie v8 On Fri, Feb 18, 2011 at 6:13 PM, Jeff Schwartz jefftschwa...@gmail.comwrote: textarea also doesn't work in chrome v9.0.597.98 On Fri, Feb 18, 2011 at 6:09 PM, Andy pula...@gmail.com wrote: The AutoSizingTextArea widget is up at

Re: How to make a TextArea auto-growing...?

2011-02-18 Thread Andy
Jeff, I couldn't tell if you were replying to Brandon or me, but I did notice an issue with my demo in Firefox 3.6. It was just the way that demo was built and has been fixed. http://code.google.com/p/gwt-traction/ Cheers, Andy On Feb 18, 6:11 pm, Jeff Schwartz jefftschwa...@gmail.com wrote: