I need a way to change the font color on a button at runtime if certain conditions are met. The point is, whenever a particular field in a db is not blank then make the button stand out so that the user knows that there is something there to look at.
I tried it like this:
IF query.fieldbyname('comment').asString <> '' THEN
button1.font.color := clYellow;
or something to that extent. It didn't come close to working. One problem I seem to have is, even at design time, I can't make the button font color change. So what I did was try and substitute the color = yellow for size = 4 so I could at least see if the IF statement was working...it didn't seem to be, as nothing changed.
I'm using Delphi 7, and BDE.
I tried it like this:
IF query.fieldbyname('comment').asString <> '' THEN
button1.font.color := clYellow;
or something to that extent. It didn't come close to working. One problem I seem to have is, even at design time, I can't make the button font color change. So what I did was try and substitute the color = yellow for size = 4 so I could at least see if the IF statement was working...it didn't seem to be, as nothing changed.
I'm using Delphi 7, and BDE.