How do I make a button control appear in front of a graph in a panel?

Here's my test: Create a new panel, then create a (sub) window in the panel. Now create a new button. If the button is dragged over the window, then it gets hidden behind the window. If it's in the part of the panel without the window, then the button is visible. I would like the button to appear on top of the window. How do I do this?



A somewhat related question is this. If I create a new, standalone graph window, then it is possible to add a button control in it using  Graph/Add Control... But if I add a graph sub window to a control panel, then select this sub window, the items in Graph/Add Control... are all grayed out. 

If I add a panel to the original panel, I *am* able to add controls to the sub panel. 

This behavior seems somewhat inconsistent. Why can I add controls to a graph but not a graph subwindow? But I can add controls to a sub-panel.

Our opinion is that controls should never have been allowed in graphs in the first place, but we can't go back on that promise now. With graph subwindows, we had a chance to at least partly fix that mistake.

So your option to get the button inside your graph subwindow is to add a sub-panel inside the sub-graph. Put the button in that sub-panel.

Could you describe what you're trying to achieve? Maybe there's something else you could do.

I find that being able to add buttons to a window is actually pretty useful. I'm not sure why this would be frowned upon. But if they can't be added to sub windows, so be it. I'll just add a panel.

Or make a panel window with a graph sub-window. That can actually be quite attractive.

The problem isn't with putting controls in panels- control panels were designed for exactly that. It's that graph windows are complicated and ofter slow to draw, and being able to put controls into them makes it much worse. So we have drawn the line at graph subwindows in order to not break people's ancient code.




Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More