Zooming images by double clicking

Hi all,

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
Hi,

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.
Hi

Quote:
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.


Unfortunately, there can be variable numbers of images, so the size and positions won't be the same each time.

Quote:
Alternatively, have you looked into the code behind WM's Graph Browser?


I hadn't seen that. I'll look into that now... Thanks for the tip-off!

Quote:
Finally, what kind of window are you using to display the graphs? It may make a difference.


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
Here's another idea: display each image in its own graph subwindow. Then the double-click event caught by your window hook would name the subwindow where the double-click happened.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com