How do I make a button control appear in front of a graph in a panel?
amtravco
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?
Thanks!
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
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.
February 9, 2020 at 01:45 pm - Permalink
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.
February 11, 2020 at 01:05 pm - Permalink
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.
February 22, 2020 at 05:55 pm - Permalink
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.
February 24, 2020 at 01:37 pm - Permalink