I'm wondering if there's a way to disable drag and drop for a tree. I find myself sometimes inadvertently dragging nodes and getting some unusual results (new nodes appear representing the C:\ directory when it's not a "filesystem" type tree).
I'm hopeful there's a single property that can be set to disable it versus intercepting the events and ignoring them.
Any help would be greatly appreciated.
Thanks,
Ritch
Disabling drag and drop
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Disabling drag and drop
Hi Ritch
As far as possible working with rTree mimics the way you work with other controls in LiveCode. Consequently to disable drag and drop you can trap the dragNodeStart message sent to an rTree control when the user initiates the drag, preventing the drag and drop from being executed.
Place a dragNodeStart handler in the script of the control that does not contain a pass control structure:
All the best,
Mats
As far as possible working with rTree mimics the way you work with other controls in LiveCode. Consequently to disable drag and drop you can trap the dragNodeStart message sent to an rTree control when the user initiates the drag, preventing the drag and drop from being executed.
Place a dragNodeStart handler in the script of the control that does not contain a pass control structure:
Code: Select all
on dragNodeStart -- in script of a rTree control or one of its owners
-- do nothing, but trap the message to disable drag & drop.
end dragNodeStart
Mats
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects
Re: Disabling drag and drop
Thanks so much. This works great!
Ritch
Ritch