Drag and drop into SetVariable
I'm using Igor 8.05 and have a panel with a SetVariable control that takes a string input (i.e. value = _STR:""), which is meant to take a full path to a wave that will be operated on later. I was hoping to be able to drag and drop the wave directly from the data browser into the SetVariable field, and have it paste in the full path. This is what happens when you drag a wave onto the command line window. I tried setting a window hook that would trigger on mouse up (when I'm dropping the wave onto the set variable) to try to access whatever data Igor has when it does a drag and drop for the command line, but it seems that window hooks are ignored when you're dragging a wave from the data browser around. Any ideas on ways around this, or if this just isn't possible at this point? Thanks
No, that's simply not possible and quite likely never will be possible. The architecture behind the Data Browser and SetVariable controls is about this far apart: <--------------------->
You might be better off using the wave selector widget package, or possibly have a button instead of a SetVariable that pops up an instance of the modal data browser to select a wave. Both of those alternatives are non-ideal in different ways.
I'm not sure which unit a "-" is in....maybe something like light years.
September 1, 2020 at 11:21 am - Permalink
Ha ok, fair enough
September 1, 2020 at 11:22 am - Permalink
You can also select the wave in the Data Browser, copy, and then paste into the SetVariable field, which is about as easy as dragging it.
September 1, 2020 at 03:00 pm - Permalink
As mentioned elsewhere in the forum, IP9 will allow to add user defined context menues for the databrowser. So it should be possible to interact with the current top window from that.
September 3, 2020 at 07:27 am - Permalink