Zooming images by double clicking
Bones
I am trying to create a user interface where I have a bunch of images displayed in one window (up to about 30 images). This is my preview pane. I would like the user to be able to double click on any image to open a new window showing only the image that was clicked on. I've set up a window hook and I've tried the tracefrompixel function, but it doesn't seem to work for images.
Is there an easy way to determine which image has been clicked on?
Thanks in advance,
B
You will probably need to resort to finding the pixel location or axis values for the mouse click and determine which image was selected from that location. If your graphs are all the same size this should not be difficult to do.
Alternatively, have you looked into the code behind WM's Graph Browser? The browser is found on the Misc Menu > Graph Browser, and the procedure file is GraphBrowser.ipf. This uses a control panel and graphs are displayed in a list box. There is a special list box property that interprets text as a wave names and enables the graph display. By default you know the graph name from the text info underlying the list box.
Finally, what kind of window are you using to display the graphs? It may make a difference.
September 25, 2012 at 06:03 am - Permalink
Unfortunately, there can be variable numbers of images, so the size and positions won't be the same each time.
I hadn't seen that. I'll look into that now... Thanks for the tip-off!
I'm using a graph subwindow within a panel. It has a bunch of floating axes that are not shown.
Thanks for getting back to me.
Cheers,
B
September 25, 2012 at 02:25 pm - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
September 25, 2012 at 04:12 pm - Permalink
October 15, 2012 at 02:36 pm - Permalink