Click here to Skip to main content
16,016,605 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a List<Object>. I need to read it one by one once user press start button and display each value on the label one by one until user press Stop button. That mean list is reading again and again until user press stop.


1). Each list object should be display on label by keeping readable time.

2). List should read until press stop.

3). Once user pres stop i need to capture what is object(text value) on the label.
Posted
Comments
Ron Beyer 20-Jun-13 0:28am    
This is a requirement, what is your question? What have you tried? Where are you stuck?

1 - Why would you use a list of objects instead of strings ?
2 - you can create a loop that keeps reading the list, but to make your UI responsive, you probably need to do it in a thread. Application.DoEvents() might be enough, though ( do it inside your loop _
3 - What do you mean by 'capture' ?

This sounds like an odd requirement, why do you need it ? Have you written any code ? You don't even say what UI framework you're using ?
 
Share this answer
 
Comments
tkkf87 20-Jun-13 0:35am    
foreach (AllAcctsisObject myLisyValue in mylist) {

label1.Text = myLisyValue.Name;

}

and it is 3.5 .NET framework
capture mean i need the name what is display on label to further process.
I don't have experience with thread, Do you have dummy code for it.
Christian Graus 20-Jun-13 0:40am    
The MSDN has tons of sample code, but like I said, you might get away without using a thread. What you're suggesting is retarded though. The names will change far too fast for the human eye to see, that needs to be a very long list for it to even take long enough for you to notice.
tkkf87 20-Jun-13 3:35am    
thank you very mach.itz work for me
I have put this code before display value on the label..
Itz works for me..


Application.DoEvents();
 
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