The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Detect Visible Graphs
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

CStorey

Canada
137 Posts

Posted - 07/04/2002 :  5:21:38 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Laurie

USA
404 Posts

Posted - 07/09/2002 :  1:46:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000