AddCallbackItem menu item, how to pass a variable
Posted: 05 Apr 2017, 15:47
Hi,
is there a way to pass a string from the menu item to the callback handler function. For dynamically created menu items I'd like to attach some information (directory path) that is passed from the menu item to the callback function. I've tried to abose the help string for this but for some reason I can't set .Help for submenu or callback items.
The only thing I've managed so far is to have a dictionary mapping based on the menu item lablel and having the callback function lookup from that based on in_ctxt.Source.Name in the callback function.
Thank you,
Fabian
is there a way to pass a string from the menu item to the callback handler function. For dynamically created menu items I'd like to attach some information (directory path) that is passed from the menu item to the callback function. I've tried to abose the help string for this but for some reason I can't set .Help for submenu or callback items.
The only thing I've managed so far is to have a dictionary mapping based on the menu item lablel and having the callback function lookup from that based on in_ctxt.Source.Name in the callback function.
Thank you,
Fabian