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 modify graph's name in origin C program?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

liujibao

China
Posts

Posted - 12/16/2003 :  10:16:50 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I created many graphs,but I cann't how to recognize each of them ,so I want to do it through modifying the graphs' name.
ou,sorry,the "graph" just is GraphPage.

Thanks.

Your service is very earnest to customers.

Iris_Bai

China
Posts

Posted - 12/17/2003 :  04:42:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Liujibao,

Please try the following testing code to rename page name and set label.

 
void run_this()
{
GraphPage gp;
gp.Create(NULL, CREATE_HIDDEN);//Create one page as hidden
gp.Show(TRUE); //Show the graph page
gp.Rename("New Name"); //Rename the page's name
printf("%s\n", gp.GetName());

gp.Label = "This is Label"; //Set the page's label
gp.TitleShow = WIN_TITLE_SHOW_BOTH; //Show Name and Label of the page

}


Iris



Edited by - Iris_Bai on 12/17/2003 05:36:15 AM
Go to Top of Page

liujibao

China
Posts

Posted - 12/18/2003 :  12:34:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank Your for reply.
Your code is out of question when I run it.
but when I use it in my code, the question appears:

void Plot_Data(Worksheet &wks,UINT xcol,UINT y1col,UINT y2col,UINT y3col,UINT y4col,UINT y5col)
{
GraphPage grph; // Create a graph window from a Template
string strTemplate="D:\mytemplate.otp
BOOL bOK = grph.Create(strTemplate, CREATE_VISIBLE);
if (!bOK)
return;
grph.ReName("Es graph");
}


the result is:

D:\Test.c(254) :Error, Member function GraphPage::ReName not defined or does not have matching prototype.
D:Test.c(247) :Error, error(s) found in compiling method
D:\Test.c(254) :Error, general compile error
D:\Test.c(247) :Error, error(s) found in compiling function Plot_Data

Compiling errors found, linking cannot start!


why?
Go to Top of Page

liujibao

China
Posts

Posted - 12/18/2003 :  12:38:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
ou, I see, I just write "Rename" as "ReName",but it is exactly written in origin help.
Go to Top of Page

Iris_Bai

China
Posts

Posted - 12/18/2003 :  01:58:53 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, this is a bug. "ReName" appear in help document in earlier Origin version. For now, it has updated to "Rename".
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