CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Y / N Label Highlighted instead of Checkbox [Solved]

Print topic Send  topic

Author Message
yourguide


Posts: 44
Posted: 06/25/2012, 12:40 PM

Very new user to Codecharge... just wanted to ask the best way to go about using code to change the color of a label when the data is a "Y" and leaving alone when its a "N".
I have a bunch of Y/N values I need to display.
The idea is instead of a whole bunch of checkboxes... I want to change the label to RED when the value is "Y" so as to highlight those.
I know how I would accomplish this with straight PHP code... but I wanted to know if there is a "CodeCharge" way of doing this kind of thing?

Example: (Not valid code.. just to get the point across)

Spec A - <RED>Spec B</RED> - Spec C
<RED>Spec D</RED> - Spec E - Spec F

Thanks.

_________________
Independent, self-employed, web developer.
View profile  Send private message
saseow

Posts: 744
Posted: 06/25/2012, 9:29 PM

Try something like this:
In the label properties make sure it is HTML then...

In the "Before Show" event"
if ($Component->GetValue() == 1)
{
$Component->SetValue("Y");
$Component->SetValue("<font color=RED>".$Component->GetValue()."</font>");
}
else
{
$Component->SetValue("N");
}
View profile  Send private message
yourguide


Posts: 44
Posted: 06/27/2012, 11:04 AM

Thank you. That's got me going on the right track!

_________________
Independent, self-employed, web developer.
View profile  Send private message
yourguide


Posts: 44
Posted: 06/27/2012, 11:05 AM

Now if only I would stop trying to learn Codecharge on my live project... perhaps I wouldn't be so upset when it blows up. :(

_________________
Independent, self-employed, web developer.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.