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
 Forum for Origin C
 How to sort the window list?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

winflowers

USA
34 Posts

Posted - 11/05/2007 :  08:31:19 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Origin 7.5 SR6
Operating System: Windows XP

I have 7 graph windows under an Origin project subfolder. I can access the graph window using menu "Window" (Alt+w) and the number. But I found sometimes the number were changed for the same graph window when I had made some modifications. Is it possible to sort this window list again with OriginC code or any other methodes?

Another question is: How to access and activate the window in the project explorer(right window) only using keyboard?

Any help is appriciated!

Mike Buess

USA
3037 Posts

Posted - 11/06/2007 :  08:09:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
As far as I know there is no programmatic control over the window list and the only keyboard control over project explorer is icon selection with the up and down arrows.

Mike Buess
Origin WebRing Member
Go to Top of Page

winflowers

USA
34 Posts

Posted - 11/07/2007 :  08:09:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Finally I could manage to sort the window list with OriginC. Although it is not so elegant, at least it works. If you want to sort the graph window list under a project folder, you can try the following code:

void sort_graph()
{
Folder fld = Project.ActiveFolder();
string strFdName = fld.GetName();
StringArray saName;
foreach(PageBase pb in fld.Pages)
if( pb.GetType() == EXIST_PLOT )
saName.Add(pb.GetName());
saName.Sort();
int iNum = saName.GetSize();
for (int ii=0; ii< iNum; ii++)
{
string gh_Name = saName[ii];
GraphLayer gl(gh_Name);
set_active_layer(gl);
Project.ActivateFolder("/");
Project.ActivateFolder("/"+strFdName);
}
}
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