PDA

View Full Version : How do I get the field of a form to data-dependent change the color?


DevilsAngel
06-04-03, 06:51
Hi!
I am working with Paradox 10.

I have created a form where you can enter Data to a table. If the user leaves one of the fields blank, I want this field on the form to turn red.
I have tried it with this code, but it doesn't work:

method action(var eventInfo ActionEvent)
if eventInfo.id() = DataArriveRecord then
doDefault
if Seminarnummer.Value = ("blank") then
self.Color = red
else
self.Color = transparent
endif
endif
endmethod

I also tried this method, but Paradox 10 seems to not know this method:

method changeColor()
if Seminarnummer.Value = ("blank") then
self.Color = red
else
self.Color = transparent
endif
endMethod


How can I solve this Problem?

Shores
08-27-03, 17:21
You should experiment with the two methods NewValue and ChangeValue.

Do remember that they're visible only if you've turned on the Avdanced ObjectPAL mode from paradox's options dialog box.

Bye!