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
 how can I change the color of a string

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
marco.zorcic Posted - 10/18/2006 : 11:08:33 AM
Hi all,

my problems are like this:

I load my graph (a template) and the text is already insert in the layer (in the color gray).
Now I won't to write the text new with the following code.


GraphLayer glSum;
GraphObject goSum;
glSum=gpSumTest.Layers(0);
goSum=glSum.GraphObjects("Text");
strLabelText.Format("f / Ghz \n S11 / dB \n S12 / dB \n S21 / dB \n S22 / dB");
goSum.Text=strLabelText;

And my problem is, I don't know how can I change the color of the string strLabelText



thanks


4   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 10/19/2006 : 07:58:17 AM
quote:
Is there anywhere a reference, for this stuff?
Not that I know of. Use out_tree(goSum.Label) to find all Label properties.

quote:
when I execute your code, comes a error message with "TEXT.COLOR isn't a valid name"??
Try glSum.LT_execute(strLTcommand).

Mike Buess
Origin WebRing Member
marco.zorcic Posted - 10/19/2006 : 02:34:13 AM
Thanks to both!

@Mike.
It works fine. Is there anywhere a reference, for this stuff?

@ rlewis

when I execute your code, comes a error message with "TEXT.COLOR isn't a valid name"??

Mike Buess Posted - 10/18/2006 : 12:06:40 PM
This will also work...

goSum.Label.Color.nVal = 1; // 0=black, 1=red, 2=green,...

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 10/18/2006 12:07:53 PM
rlewis Posted - 10/18/2006 : 12:05:05 PM
Try ...

 
int iColor=2; // assign iColor the desired value of the color
string strColor;
strColor.Format("%d",iColor);
string strLTcommand=goSum.GetName()+".color="+strColor;
LT_execute(strLTcommand);

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