SV: Updating status label and status bar
- From: "K Viltersten" <tmp1@xxxxxxxxxxxxxx>
- Date: Sun, 17 Feb 2008 20:16:15 +0100
bar.PerformStep ();
if (bar.Value < bar.Maximum)
status.Text = "Pretending to work!";
else
status.Text = "Done.";
If you want to see the value at 100% before the text saying done shows up, then you need to put a small delay in the "else" part of your code.
I noticed that there's a property for the bar stating what time
it should take for the animation to move the fill to the requested spot. I'm guessing that's the time i should delay
my text updating by. Correct?
When you mentioned a delay - is there an other way to do
it than threads? I've found this solution.
else {
System.Threading.Thread.Sleep (1000);
status.Text = "Done."; }
The thing is that while it postpones the text update (good, good) it also removes the animation of the bar. By other
words - the bar waits for a second, then skips to the new
position, instead of being "pumped-up".
Most of all, it would be nice to get a report from the bar saying "yey, i'm done animating" and then proceede.
Too much?
--
Regards
Konrad Viltersten
--------------------------------
IT-Consultant
Mandator, Fujitsu Services
0730 - 700 418
.
- Follow-Ups:
- Re: SV: Updating status label and status bar
- From: Peter Duniho
- Re: SV: Updating status label and status bar
- References:
- Updating status label and status bar
- From: K Viltersten
- Updating status label and status bar
- Prev by Date: Help Needed Initialising Class
- Next by Date: Re: Help Needed Initialising Class
- Previous by thread: Re: SV: Updating status label and status bar
- Next by thread: Re: SV: Updating status label and status bar
- Index(es):
Relevant Pages
|