if( owned_flag = 'Y', 65535, 16777215 )
If I make the flag columns visible and editable, and I preview the
datawindow, I can set the '_flag' column to 'Y' or 'N' and see the
corresponding column change to yellow or white, just as it should. However,
when I run the application, the color never changes.
It would seem logical that the only difference between datawindow preview
and running the app is the code. So, I tried using an ordinary datawindow
(not inherited from anything) with no code in it whatsoever (other than a
SetTransObject and Retrieve), and it still didn't work. I've tried
everything I can think of. Other developers in the office have looked into
it and come up with nothing. Any ideas?
I'm using PB 6.5.1 with PFC on Win2KPro.
TIA
Jeromy Van Dusen
P.S. I am not making this up on the fly, did something similar couple of
years ago...
<Jeromy_Van_Dusen> wrote in message
news:6B26AC6A3047D5A8007B4B8185256B43.007B4BA285256B43@webforums...
I had originally tried something like that, however I ran into two problems.
First, it still didn't work -- the background color expression just got
ignored, as it does now. Secondly, I need to change the value in the field
as well. For example, if a char field retrieved from the database contains
only the value "*", it is an error and should be flagged. However, I don't
want the user to see the "*", only the highlighting. So, I'm changing the
value of that field to "", and setting the flag for the field so the
expression will cause the color to change. If the expression relies on the
actual value of the field, it will change back to the regular color as soon
as I remove the "*". I also need to be able to keep a running total of the
errors, so if I use code to check the value and update the flag, instead of
relying only on the datawindow expression, I can also use that same code to
update the error count.
Anyway, the larger problem is still that the background color expression is
getting completely ignored for reasons I cannot yet fathom. If I move that
expression to the color property, so that the foreground color will be
changed instead of the background color, it works. However I need the
background to change, not the foreground. Hence my frustration. :(
Thanks for the suggestion.
Jeromy
"Alex Osin" <alex...@hotmail.com> wrote in message
news:2RxLLVv...@forums.sybase.com...
Paul Horan[TeamSybase]
VCI Springfield, MA
www.vcisolutions.com
"Jeromy Van Dusen" <jvandusen@_SPAMFREE_online-can.com> wrote in message
news:hHJztI2...@forums.sybase.com...
That's something I had not thought of. However, I have now tried it and it
doesn't appear to make any difference. The thing that I find really odd is
that I can use the same expression on a different property (text color or
visible, for example), and it works fine. The moment I put that expression
on the background color property, it just gets ignored -- although it works
when previewing.
Here's something truly strange: The column objects all start with white
backgrounds. The expression sets them to yellow if the flag is set, and
white otherwise. If I change the column objects to start off as another
color, like blue, when I run the app they all appear as white. This would
suggest that the expression is being validated and coming up with the false
result, which changes the color to white. However, if I swap the expression
around so that it changes the color to white if the flag is set and yellow
otherwise, you would expect the column to always be yellow. But, run the
app, and all columns are STILL white. No matter what I do, the column
insists on being white. Now, this would suggest to me that there is code
hidden somewhere that is setting it white. With the exception of the PFC
code, all code in this entire application was written by me, and I am
positive there is no code elsewhere that is changing the background color.
In fact, I did a test yesterday where I used a regular datawindow (not
inherited from anything else) that contained ONLY a SetTransObject and
Retrieve, so I could be absolutely certain that no other code was being
executed that could possibly change the color, and it still didn't work.
How's that for strange?
Anyway, thanks for the suggestion.
Jeromy
"Paul Horan[TeamSybase]" <paulhATvcisolutionsDOTcom> wrote in message
news:ew1Yov2...@forums.sybase.com...
I've encounted problems like this which were fixed by calling dw_1.GroupCalc() appropriately.
jmho