T O P I C R E V I E W |
CStorey |
Posted - 07/04/2002 : 5:21:38 PM I may be looking for a complicated solution when an obvious one exists. I need to detect which graphs the user currently has displayed in the workspace. (If possible I would like to know there current state - Hidden/Visible/Minimized/Maximized - without changing it.)
I've been trying a combination of 'doc -e', 'win -o %H' and exist(%H,0) to get a list of non hidden graphs. %H changes to each graph name in turn. However it only correctly uses the original active graph in the exist function. Only this active non-hidden graph returns the desired result, even though 'win -o' should temporarly set the named graph as active. Below is the code I was trying.
nm=0; nn=0; doc -ef P { nn+=1; win -o %H { // Make each window active in turn type "$(nn)) %H - checking state.."; nm=exist(%H,0); // Check if Active (Should always be) & Not Hidden If (nm>=1) {type "$(nn)) %H - NOT hidden!"; }; }; }; del -v n*;
To test use three graphs: 1 - Active (%H) and visible, 2- Visible, 3- Hidden. I only get the result that 1 is not hidden.
Is there a LabTalk and/or OriginC solution?
Note - I got around this issue in my Origin 6.1 where the doc -ef function only worked on non-hidden windows.
Test the following in Origin 6.1 and Origin 7.1 (with the above mentioned 3 graphs)...
A - doc -e P { %H=;}; B - doc -ef P { %H=;};
Results: ========
Origin 6.1 - A types all graph names. - B types only names 1,2
Origin 7.1 - Both A&B type all 3 names.
Craig Storey Origin WebRing Member - http://g.webring.com/hub?ring=originwebring
Edited by - CStorey on 07/04/2002 18:00:11 |
1 L A T E S T R E P L I E S (Newest First) |
Laurie |
Posted - 07/09/2002 : 1:46:12 PM Hi Craig,
Unfortunately, an obvious solution does not exist at this time. We plan on implementing an Origin C Page Class Property that yields window state.
We will also try and add a new switch to the document command that will allow looping over only shown or hidden or minimized or maximized windows.
Thank you.
OriginLab Technical Support |
|
|