Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Text Colour

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I am currently running some code that changes the colour of text in a forms table depending upon certain field values.

The code is attached to the field holding the colour coded text and is shown below:

method depart(var eventInfo MoveEvent)

if Thick2 <> Thick3.value AND NOT PlateID.isblank()
then
msginfo (&quot;NESTING ERROR&quot;, &quot;You have nested a &quot; + Thick2.value + &quot; Thk item on a &quot; + Thick3.value + &quot; Thk plate&quot;)
endif

if Thick2 <> Thick3.value AND NOT PlateID.isblank()
then
PlateID.font.color = Red
else
PlateID.font.color = Black
endif

endMethod


AND

method newValue(var eventInfo Event)

if Thick2 <> Thick3.value AND NOT PlateID.isblank()
then
PlateID.font.color = Red
else
PlateID.font.color = Black
endif

endMethod


This works fine if I scroll through each record individually but when I use either the scroll bar or page down and page up to scroll through the table all text in the specified field turns red.
I have no idea why this is happening and would appreciate a helping hand on the matter!

Thanks in advance,

Woody.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top