Help with handler

This is a forum focused on providing support for rTree

Moderators: heatherlaine, robinmiller, kevinmiller, wilstrand

Post Reply
r_houdek
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 12
Joined: Wed Feb 23, 2011 1:35 am

Help with handler

Post by r_houdek » Wed Apr 09, 2014 3:16 am

I'm trying to write a handler to process a right mouse click:
- Selects the tree node with a right click
- Opens a popup menu

Thanks for your help!

Ritch

wilstrand
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Mon Jan 03, 2011 3:02 pm
Contact:

Re: Help with handler

Post by wilstrand » Thu Apr 10, 2014 9:51 am

Hi Ritch!

rTree has a built in context menu as default. If you want to use your own, you should first
disable the built in one and then call your own. Try something like this in the rTree group script:

Code: Select all

on mouseUp pButton
   set the useContextMenu of me to false
   if pButton = 3 then popUp btn "myMenu"
   pass "mouseUp"
end mouseUp
Do not forget to pass the "mouseUp".

I hope I understood what you wanted to do!

All the best!
Mats
http:www.tapirsoft.on-rev.com
Open Source LiveCode Plugins - rIDE, rGrid, rTree
LiveCode projects

Post Reply

Return to “rTree”