Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Straight to the point 
I’m creating a windows application (.net c#) , I have a button named getData. On click of this button
I need to show a label (not message box) “Flashing - progress…” once data loading is complete update the same label with “Flashing - Idle”
Can someone suggest a solution?
Posted
Updated 8-Oct-14 21:31pm
v2
Comments
Sergey Alexandrovich Kryukov 9-Oct-14 3:25am    
Not clear. What prevents you from assigning any text to a label?
—SA
Naufel Basheer 9-Oct-14 3:29am    
Yes
I can assign text to label, but the first label ("Flashing - Progress") was not reflecting .
I missed .Refresh();

see my post bellow

1 solution

use.
Label1.Refresh();


C#
private void getData_Click(object sender, EventArgs e)
        {
            lblFlashingProgress.Text = "Flashing - Progress";
            lblFlashingProgress.Refresh();
            // GetData logic comes here...
            lblFlashingProgress.Text = "Flashing - Idle";
            lblFlashingProgress.Refresh();
       

        }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900