Ctrl+A Autoscale Graph as subwindow in a Panel
gregorK
I have a question about the Ctrl+A (Windows) shortcut for autoscaling a Graph subwindow. In my application I have a panel with a Graph subwindow embedded and when I try to use Ctrl+A to autoscale its axes it does not work. Even if I first click in the graph (it gets a yellow outline, so it is selected) it does not work. I think that I read somewhere that Ctrl+A should work also with a Graph subwindow. Can anybody help? Autoscaling still works by right-clicking in the graph and selecting the appropriate menu item in the popup menu, but Ctrl+A is obviously faster and more convenient to use ...
Thank You in advance for any help/hints regarding this issue.
Cheers,
Gregor K
Ctrl-A does two different things in Igor- it does "Select All" and "Autorange". On a Macintosh (where Igor started) you can attach the Cmd-A shortcut to both menu items, and whichever item is enabled gets called when you do Ctrl-A. On Windows, you can't attach a shortcut to two different menu items. We have some surprisingly complicated code that re-writes Igor's accelerator tables depending on whether a Graph is the top window or not. If you have a graph embedded in a panel, when that window is the frontmost window the Panel menu is shown, not the Graph menu. Consequently, the Ctrl-A accelerator is not available. Unfortunate, but true.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
April 13, 2011 at 09:21 am - Permalink
Cheers,
Gregor
April 13, 2011 at 09:35 am - Permalink
Well here (on windows) this CTRL+A (as in SetAxis/A) works somehow.
I have a graph1 which has a exterior subwindow which embeds a graph2 and graph3.
And if I expand the axes in graph2/graph3 using the context menu I can happily use CTRL+A to get the complete graph shown again.
Actually, if I remember correctly, I choose exterior subwindows over panels because of the CTRL+A-working-feature.
bye,
thomas
April 13, 2011 at 09:43 am - Permalink
On Windows we did not implement the type-in-a-graph-switches-to-the-command-line feature. But on Windows you will run into the complicated procedure necessary to make Ctrl-A do the right thing depending on what is the top window. The OP was trying to use a Macintosh OS feature to reassign Cmd-A (Ctrl-A on Windows) to a different menu command. On Windows I think you would run into the code that re-assigns Ctrl-A; it would probably un-do your assignment if the top window were not a graph at some point (as is very likely).
Exterior subwindows are a bit different in that they are actual windows (an embedded graph behaves a bit like a window inside a window, but it is just something Igor draws, it's not a real window). Still, we track the type of the main window. If the main window is a graph, you will see a Graph menu.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
April 14, 2011 at 09:08 am - Permalink
thanks for the clarifications.
April 15, 2011 at 02:36 am - Permalink