• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

Turn label of a field red when data has changed in another field

I am attempting to change the color of a font in a label to RED if the value of an adjacent field has changed.  Doesn't matter what it changed to, I just need it to turn red if the item has changed at all.  I am new to this so any help appreciated.  Maximum points awarded.  I need it urgently!
1 Solution
what language?
Also need to know - when the "adjacent field" changes - how does it change?  Is the adjacent field a user input field or is it databound and read-only?
VistarTechnologiesAuthor Commented:
Powerbuilder 9.  It is a dropdown data window field.  It is databound, yes.  It pulls lookups from another table.  It's not read only.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

In the MS world, many objects have a ForeColor property that you can change dynamically.
Hi VistarTechnologies

You need to write following code in the selected index chage event  of drop down
Also make sure the autopostback property of DropDownList1 is set to true

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
try this:  this is in c#.. i dont know if it helps

Label.ForeColor = System.Drawing.Color.Red;
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now