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
 GUI for OriginC
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kineticesp

Colombia
12 Posts

Posted - 08/01/2008 :  6:21:23 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Is there a way to build a GUI for my code?, like with buttons and input boxes?

Thanks,

cpyang

USA
1406 Posts

Posted - 08/01/2008 :  9:20:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use the GetN dialog. See GetNBox.h for examples. Like this one


#include <GetNBox.h>// must include this file as it is not included inside origin.h
void tt()
{
	GETN_TREE(tr)
	
	GETN_CHECK(FitAllCurves, "Fit All Curves", 0)
	GETN_BEGIN_BRANCH(Fit, "Fitting Options")//Match GETN_END_BRANCH
		GETN_CHECK(FixIntercept, "Fix Intercept", 0)
		GETN_CHECK(FixSlope, "Fix Slope", 0)
	GETN_END_BRANCH(Fit)	//Match GETN_BEGIN_BRANCH
	GETN_NUM(Points, "Points", 20)
	
	if(GetNBox(tr, NULL, NULL, NULL, NULL))
		out_tree(tr);
}



We will provide more examples on our wiki site, but in the mean time, you can search for "GetNBox(" in the OriginC\Originlab folder to see many many such kinds of codes. Many small examples are also given inside GetNBox.h


CP


Go to Top of Page

kineticesp

Colombia
12 Posts

Posted - 08/05/2008 :  10:02:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you so much it worked!.

Now I have some more questions:

1) Is there a way to use data from an active worksheet in a GETN_LIST (for example).

2) When the project has Graphpages open it doesnt execute the code, is there a way to close all Graphpages?

Im trying this way:

foreach(GraphPage gp in Project.GraphPages)
{
foreach(GraphLayer gl in gp.Layers)
{
//Code for remove stuff.
}
}

But as you see the important part is missing :D.

Thanks again
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 08/07/2008 :  12:27:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The following code will delete all graphs in the current project



void dg()
{
	GraphPage gg;
	while(gg = Project.GraphPages(0))
		gg.Destroy();
}


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