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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Setting label for worksheet description

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hajo_old Posted - 01/30/2003 : 04:15:45 AM
Hello, all

while reading out some specific formatted ASCII file I want to import some comments into the label field shown in the following picture by OriginC or LabTalk.



Any hints or code to solve this
Thanks

HJKoch
SVDO_Origin1


-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 01/30/2003 : 2:46:20 PM
Actually, there is a native Origin C method. The following function is based on an example in Page.h. It creates a worksheet and labels the window strLabel.

void test(string strLabel)
{
WorksheetPage wp;
if( wp.Create("origin.otw", CREATE_VISIBLE_SAME) )
{
wp.Label = strLabel;
printf("Worksheet '%s' has label '%s'\n", wp.GetName(), wp.Label);
}
else
printf("Failed to create worksheet page.\n");
}

Unfortunately, in order to see the label you need to add this to the function above...

LT_execute("page.title=3;");

Always something...

...Of course here is the easy way out
1) Open Origin.otw (or whatever template you use)
2) Window...Rename
3) Select "Both name and label", leave label blank, click OK
4) Save template

Now the label for this template will always be visible.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/30/2003 3:41:03 PM
hajo_old Posted - 01/30/2003 : 08:54:47 AM
Hallo, all

thanks for your help till now!

Mike Buess - I meant the title bar of the active window (or the label, I fill in in the shown dialog box!)

This is the OriginC / LabTalk code I solved the problem so far:

PageBase pb;
pb = Project.Pages(); // get active worksheet from project
string str = strInj + "_FUP" + strFUP + "_tm" + strTihpt;
out_str(str);
string windowName;
pb.GetName(windowName); // read out the worksheet name
string LTexec = "win -rl \"" + windowName + "\" \"" + str + "\"";
LT_execute(LTexec);



This works, but is there a native OriginC solution without the LT_execute call?

Thanks


-- --
Dipl.-Ing. Hans-Joerg Koch
Siemens VDO, Regensburg

SVDO_Origin1

Edited by - SVDO_Origin1 on 01/30/2003 08:56:10 AM
Mike Buess Posted - 01/30/2003 : 08:37:07 AM
Your picture doesn't show up, so I'll guess what kind of label you want.

%Z="My comments"; //imported from file

page.label$=%Z; //Window label (title bar of active window)
wks.col$(n).label$=%Z; //Column label (nth column of active wks)
labelname.text$=%Z; //Text box label

Hope that helps.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 01/30/2003 08:39:40 AM

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000