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

srosekra

USA
Posts

Posted - 09/08/2005 :  10:40:55 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
-I have a loop that is waiting for someone to hit the TBUTN that I created, so how would I get values back from the gui controls?
-but I am creating the graph based on a template and would like to find out how it is done in both c and labtalk
-My code...
GraphPage gp;
GraphLayer gl;
GraphObject go;
gp.Create("DataFit.otp", CREATE_VISIBLE_SAME) )
//the datafit has one cntrl which is a TBUTN named DFit
string wkstname = "junkd10";
Command.Format("layer -w %s", wkstname); //puts graph on window
LT_execute( Command );
gl = (GraphLayer) gp.Layers(0);
go = gl.GraphObjects("DFit");
//also tried go = g1.GraphObjects("DFit.v1")
-can't seem to get cntrl's value. I was using the TBUTN as a check button so when clicked, DFit.v1= (in script window) changed from 0 to one. Would like to use this value to break out of the loop after the user has manipulated the graph to their liking.

-Thanks
Sean

Origin Version (Select Help-->About Origin):
Operating System:

srosekra

USA
Posts

Posted - 09/08/2005 :  10:47:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Where do you find the methods for these objects? I can't find them in the help files.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/08/2005 :  2:11:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
UIM documentation is only in the OriginPro (hardcopy) Manual and there is little direct access to UIM properties from Origin C. Unless you are sure that DFit will be in the active layer this is probably the best way to get at its properties...

GraphPage gp("Graph1");
GraphLayer gl = gp.Layers(0);
GraphObject go = gl.GraphObjects("DFit");
if( go ) // you can test for its existence
{
double dVal;
gl.LT_execute("v1=DFit.v1");
LT_get_var("v1",&dVal);
out_int("DFit.v1=",(int) dVal);
}
else
out_str("DFit does not exist.");

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 09/08/2005 2:15:48 PM
Go to Top of Page

srosekra

USA
Posts

Posted - 09/09/2005 :  6:53:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
THAT WORKED GREAT!

Thanks
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