Click here to Skip to main content
15,846,144 members
Home / Discussions / C#
   

C#

 
QuestionChanging the text of label Pin
sujithkumarsl3-May-07 0:19
sujithkumarsl3-May-07 0:19 
AnswerRe: Changing the text of label Pin
Giorgi Dalakishvili3-May-07 0:28
mentorGiorgi Dalakishvili3-May-07 0:28 
GeneralRe: Changing the text of label Pin
sujithkumarsl3-May-07 0:42
sujithkumarsl3-May-07 0:42 
GeneralRe: Changing the text of label Pin
Giorgi Dalakishvili3-May-07 0:46
mentorGiorgi Dalakishvili3-May-07 0:46 
GeneralRe: Changing the text of label Pin
sujithkumarsl3-May-07 0:52
sujithkumarsl3-May-07 0:52 
GeneralRe: Changing the text of label Pin
Sandeep Akhare3-May-07 0:58
Sandeep Akhare3-May-07 0:58 
GeneralRe: Changing the text of label Pin
sujithkumarsl3-May-07 1:06
sujithkumarsl3-May-07 1:06 
GeneralRe: Changing the text of label Pin
Soundman32.23-May-07 1:59
Soundman32.23-May-07 1:59 
That won't work, it will just delay the code.

You need to tell Windows to redraw the label with :
label1.Text = " method1";
label1.Refresh();
method1();
label1.Text = "method2";
label1.Refresh();
method2();
label1.Text = "method3";
label1.Refresh();
method3()

From the help for Control.Refresh:
Forces the control to invalidate its client area and immediately redraw itself and any child controls.


GeneralRe: Changing the text of label Pin
Dave Kreskowiak3-May-07 4:49
mveDave Kreskowiak3-May-07 4:49 
GeneralRe: Changing the text of label Pin
Rudolf Jan3-May-07 1:14
Rudolf Jan3-May-07 1:14 
GeneralRe: Changing the text of label Pin
sujithkumarsl3-May-07 1:17
sujithkumarsl3-May-07 1:17 
GeneralRe: Changing the text of label Pin
gumi_r@msn.com3-May-07 4:03
gumi_r@msn.com3-May-07 4:03 
GeneralRe: Changing the text of label Pin
Dave Kreskowiak3-May-07 4:51
mveDave Kreskowiak3-May-07 4:51 
GeneralRe: Changing the text of label [modified] Pin
gumi_r@msn.com3-May-07 7:08
gumi_r@msn.com3-May-07 7:08 
GeneralRe: Changing the text of label [modified] Pin
gumi_r@msn.com3-May-07 7:40
gumi_r@msn.com3-May-07 7:40 
GeneralRe: Changing the text of label Pin
Dave Kreskowiak3-May-07 14:33
mveDave Kreskowiak3-May-07 14:33 
GeneralRe: Changing the text of label Pin
Dave Kreskowiak3-May-07 4:48
mveDave Kreskowiak3-May-07 4:48 
GeneralRe: Changing the text of label Pin
sujithkumarsl3-May-07 9:42
sujithkumarsl3-May-07 9:42 
QuestionHow to get control of selected component. Pin
suveenmohan2-May-07 23:48
suveenmohan2-May-07 23:48 
AnswerRe: How to get control of selected component. Pin
Arun.Immanuel3-May-07 0:22
Arun.Immanuel3-May-07 0:22 
GeneralRe: How to get control of selected component. Pin
suveenmohan3-May-07 0:28
suveenmohan3-May-07 0:28 
GeneralRe: How to get control of selected component. Pin
Arun.Immanuel3-May-07 1:21
Arun.Immanuel3-May-07 1:21 
AnswerRe: How to get control of selected component. Pin
AFSEKI7-May-07 6:36
AFSEKI7-May-07 6:36 
QuestionCulture and ResourceBundle Questions Pin
Ollie19862-May-07 23:39
Ollie19862-May-07 23:39 
QuestionFinding Info about a dll using Reflection Pin
SatyaDY2-May-07 23:00
SatyaDY2-May-07 23:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.