I''ve seen web apps where cells within a table column can be highlighted by dragging over them. NumSum does this. Any ideas on how this is achieved? When I try to select cells in a column by dragging over them the text within rows gets selected as well. Take Care -- Aneesha _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
In my dragdrop.js file there is a line (can''t remember if I added it or if it was there to begin with, lol) that prevents text selection while dragging a Draggable object... you could use something similar at a global level if you don''t just want to limit the behavior to Draggables. The register() method of "Draggables" looks like this... register: function(draggable) { if(this.drags.length == 0) { this.eventMouseUp = this.endDrag.bindAsEventListener(this); this.eventMouseMove = this.updateDrag.bindAsEventListener(this); this.eventKeypress = this.keyPress.bindAsEventListener(this); Event.observe(document, "mouseup", this.eventMouseUp); Event.observe(document, "mousemove", this.eventMouseMove); Event.observe(document, "keypress", this.eventKeypress); // prevent text selection while dragging. document.onselectstart = document.ondragstart = function() { return this.activeDraggable == null; }.bind(this); } this.drags.push(draggable); }, ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Aneesha Bakharia Sent: Thursday, March 02, 2006 3:54 AM To: Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] Hey How did they do that? I''ve seen web apps where cells within a table column can be highlighted by dragging over them. NumSum does this. Any ideas on how this is achieved? When I try to select cells in a column by dragging over them the text within rows gets selected as well. Take Care -- Aneesha The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Here a bit on preventing text selection, cross-browser compatible: http://mir.aculo.us/articles/2005/07/19/disabling-text-selection-for- web-2-0-apps -Thomas Am 02.03.2006 um 10:53 schrieb Aneesha Bakharia:> I''ve seen web apps where cells within a table column can be > highlighted by dragging over them. NumSum does this. Any ideas on > how this is achieved? When I try to select cells in a column by > dragging over them the text within rows gets selected as well. > > Take Care > > -- > Aneesha > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Thanks - this has been a big help in achieving the interface I am after. Aneesha On 3/3/06, Thomas Fuchs <t.fuchs-moWQItti3gBl57MIdRCFDg@public.gmane.org> wrote:> > Here a bit on preventing text selection, cross-browser compatible: > http://mir.aculo.us/articles/2005/07/19/disabling-text-selection-for- > web-2-0-apps > > -Thomas > > Am 02.03.2006 um 10:53 schrieb Aneesha Bakharia: > > > I''ve seen web apps where cells within a table column can be > > highlighted by dragging over them. NumSum does this. Any ideas on > > how this is achieved? When I try to select cells in a column by > > dragging over them the text within rows gets selected as well. > > > > Take Care > > > > -- > > Aneesha > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Aneesha _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs