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

Posted on 2006-03-24
Last Modified: 2010-04-17
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!
Question by:VistarTechnologies
    LVL 25

    Expert Comment

    what language?
    LVL 7

    Expert Comment

    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?

    Author Comment

    Powerbuilder 9.  It is a dropdown data window field.  It is databound, yes.  It pulls lookups from another table.  It's not read only.
    LVL 23

    Expert Comment

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

    Accepted Solution

    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)
    LVL 5

    Expert Comment

    try this:  this is in c#.. i dont know if it helps

    Label.ForeColor = System.Drawing.Color.Red;

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Problem to adjust sheet 1 78
    dividesSelf challange 15 60
    Replace a tag with sed 2 32
    find a node in VST 2 37
    INTRODUCTION We all know how to code. But at times you simply want to insert a common code block into your existing code and amend it as per your requirements. This tool not only saves you time but also saves you the pain of typing it all out aga…
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now