I haven't done this, but it would be fun and not too hard, but not exactly trivial.
You'll need to have very skinny cells that will represent your borders and have either a graphic or a background color so it looks like a border. Put some mouse handlers on these cells or use handlers on the entire table and determine which cell the event has taken place on. OnMouseOver you'll change the cursor to the appropriate sizing cursor. OnMouseOut change cursor back to default. OnMouseDown record the fact that the mouse is now down and the x/y coords of the pointer. OnMouseUp record the fact that the mouse is now up. OnMouseMove check to see if the mouse is down and then calculate the distance the mouse has moved from the original x/y coords the pointer had on the OnMouseDown event. Resize your cells accordingly. Done. Just a bit of thought needs to go into those calculations but thats nothing I haven't done before and probably same for you. On Feb 16, 12:21 pm, cloudycity <[email protected]> wrote: > The new celltable does support setting column widths on the fly and > works great but ... > We would like to be able to use the mouse to drag the column widths to > a desired size by grabbing an edge of the header with the mouse. I > don't know how to accomplish this - I know it's not 'built-in' and we > would have to write some code. > If anyone has made this work I would appreciate a pointer on how to > get started. > > Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
