Thanks Aaron,
But I have a problem, this is the snippet
R2 = 10
R2 = W-(25*H*H/10000)
CanLose.text = format(R2, "#.##")
if Val(CanLose.Text) < 0 then
CanLose.TextColor = &hFF0000
End if
What happens, is that format(R2, "#.##") does not give back a signed answer,
so I tried
R2 = 10
R2 = W-(25*H*H/10000)
CanLose.text = format(R2, "#.##")
if Val(R2) < 0 then
CanLose.TextColor = &hFF0000
End if
then I used
R2 = 10
R2 = W-(25*H*H/10000)
CanLose.text = format(R2, "#.##")
if R2 < 0 then
CanLose.TextColor = &hFF0000
End if
But I still cannot compile.
Kindly assist again.
Thanks.
Lennox.
From: Aaron Ballman <aaron at realsoftware dot com>
Reply-To: Getting Started <gettingstarted at lists dot realsoftware dot com>
To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Return value Red if negative
Date: Mon, 31 Jan 2005 17:24:59 -0600
if CanLose.Text < 0 then
if Val( VanLose.Text ) < 0 then
CanLose.TextColor = &hFF0000
End if
Note that CanLose must have it's Styled flag set to true in the properties
window.
HTH!
~Aaron
--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|