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
 LabTalk Forum
 Object /text color

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
Maxbrain0 Posted - 09/03/2009 : 10:57:35 AM
Origin Ver. and Service Release: Origin 8 SR 4
Operating System: Windows XP pro

I have created several LabTalk scripts to follow different import filters that determine from the data whether they pass or fail. I am able to determine the criteria and then display the pass/fail as a string or object on a template plot. I was looking for a way to make make the text or text box to be one color for pass and one color for fail, instead of just displaying the text.

Here's some of examples of what I'm doing at the end of the code and how I need to change the color.

For example
if(gain_30>=gain_3dB && gain_330>=gain_3dB)
page.info.user.variables.bandwidth$ = "PASSES 30 degree,3 dB bandwidth spec";
else
page.info.user.variables.bandwidth$ = "FAILS 30 degree,3 dB bandwidth spec";

if(gain_60>=-15 && gain_300>=-15)
page.info.user.variables.rolloff$ = "PASSES 60 degree,-15 dBi spec";
else
page.info.user.variables.rolloff$ = "FAILS 60 degree,-15 dBi spec";

I then display the desired strings in the template.

I also can do something similar with objects, as follows.

if((stats.max<lim_max))
passfail.text$ = "Passed, data is < $(lim_max)";
else
passfail.text$= "Failed, data is not < $(lim_max)";

Any help is greatly appreciated.

Jacob
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 09/14/2009 : 10:30:44 AM
Just use escape sequences to add formatting to your strings. To add color (Blue = Pass, Red = Fail) use:

if(gain_30>=gain_3dB && gain_330>=gain_3dB)
page.info.user.variables.bandwidth$ = "\c4(PASSES 30 degree,3 dB bandwidth spec)";
else
page.info.user.variables.bandwidth$ = "\c2(FAILS 30 degree,3 dB bandwidth spec)";

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