
Placement of exterior subwindows

thomas_braun
I'm using exterior subwindows quite a lot for adding GUI controls to graphs.
Now I'm facing the problem that I'm starting to run out of vertical space as I don't seem to be able to place them space efficiently.
The following code
Window Panel0() : Panel PauseUpdate; Silent 1 // building window... NewPanel/K=1/W=(387,658,914,1141) NewPanel/HOST=#/EXT=1/W=(49,0,0,237) ModifyPanel fixedSize=0 RenameWindow #,P0 SetActiveSubwindow ## NewPanel/HOST=#/EXT=1/W=(50,0,0,237) ModifyPanel fixedSize=0 RenameWindow #,P1 SetActiveSubwindow ## EndMacro
gives a graph and two exterior subwindows P1 and P0 on the left of the graph. Is it possible to move P1 below P0?
Thanks,
Thomas
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
February 13, 2017 at 05:09 pm - Permalink
February 13, 2017 at 05:14 pm - Permalink
-Matthew
February 14, 2017 at 07:31 am - Permalink
It looks interesting! I'm a bit concerned about the "grueling coding" as I'm the one how has to code it and also needs to adapt it quite often.
How have you implemented the triangle for opening/closing the sub groups?
February 15, 2017 at 05:36 am - Permalink
Controls below the collapsed panel "disappear" when the panel is collapsed.
Check out the ScrollTraces package for details.
http://www.igorexchange.com/project/ScrollTracesPanel
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
February 15, 2017 at 06:09 am - Permalink
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
February 15, 2017 at 12:04 pm - Permalink
The basic strategy I use is to test each one of those triangles for if it is active, and update the disable state for each of "its" controls (hiding or showing as appropriate). If to be shown, I update each control's position (this is the grueling part), based on its local position plus an overall offset. That overall offset gets incremented with each grouping.
Maybe a simplified snippet will explain better:
It is a little fiddly getting all the spacings just right.
-Matthew
p.s. Thanks for pointing out "Extract" somewhere. How did I miss that one? Very useful.
March 3, 2017 at 12:38 pm - Permalink
March 3, 2017 at 02:35 pm - Permalink