Article Options
Recently Viewed
Premium Sponsor
Premium Sponsor

 »  Home  »  .NET Newbie  »  Chart Success: Second Helpings of Pie. Part 3  »  Restart Option
 »  Home  »  Windows Development  »  Graphics  »  Chart Success: Second Helpings of Pie. Part 3  »  Restart Option
Chart Success: Second Helpings of Pie. Part 3
by Ged Mead | Published  03/23/2005 | .NET Newbie Graphics | Rating:
Restart Option

 

The Oops! Option
   

 We’re almost done.  The user can enter as much data as they like and the chart can be refreshed each time to display the data and the pattern/color choices.  But there may come a time when the user wants to start over again.

  Rather than forcing them to close the application and fire it up again, let’s finish off by giving them a button to remove the data and clear the decks for another go.

  This code in the Click event of the Restart button is all that is needed:

   Private Sub btnRestart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles  btnRestart.Click
        UserData.Clear()
        pnlChart.Invalidate()
    End Sub


Our new friend, the Invalidate method, once again does most of the work for us, once we have removed all data from the arraylist.

Comments    Submit Comment

Comment #1  (Posted by an unknown user on 03/25/2005)
Rating
The good is getting even better. Cool job, Ged.
 
Comment #2  (Posted by an unknown user on 04/19/2005)
Rating
an amazing series of articles! It difficult to explain in such a simple way has you did. Thanks
 
Comment #3  (Posted by Ronan on 04/13/2006)
Rating
Hi i have read these tutorials and am looking your help.
I am trying to develop a pie chart interface in Visual Studio 2003 for a PDA (Smart Device Application) and tried your code. however it is not compatible as it does not recognise the drawPie and FillPie commands, etc. Do you have an example i could use to help me for this?
Thank you, Ronan
 
Comment #4  (Posted by PeteB on 05/22/2006)
Rating
reall useful.
 
Comment #5  (Posted by an unknown user on 12/08/2006)
Rating
Very Educative
 
Comment #6  (Posted by an unknown user on 08/27/2007)
Rating
clear / simple
 
Comment #7  (Posted by Lorin on 01/12/2012)
Rating
Stellar work there everynoe. I'll keep on reading.
 
Comment #8  (Posted by buy cheap oem software on 02/10/2012)
Rating
kVPQom A unique note..!!
 
Comment #9  (Posted by cheap oem software on 02/12/2012)
Rating
rFRyun I am amazed with the abundance of interesting articles on your site! The author - good luck and wish you the new interesting posts..!!
 
Comment #10  (Posted by esalerugs promo code on 02/13/2012)
Rating
The text is promising, will place the site to my favorites..!!
 
Comment #11  (Posted by cheapoair on 02/13/2012)
Rating
Hooray! the one who wrote is a cool guy..!!
 
Comment #12  (Posted by how to get twitter followers free on 02/13/2012)
Rating
I decided to help and sent a post to the social bookmarks. I hope to raise it in popularity!!....
 
Comment #13  (Posted by viagra on 02/13/2012)
Rating
Yeah !... life is like riding a bicycle. You will not fall unless you stop pedaling!!....
 
Comment #14  (Posted by Voorhees NJ personal trainer on 02/13/2012)
Rating
I subscribed to RSS, but for some reason, the messages are written in the form of some hieroglyph (How can it be corrected?!....
 
Comment #15  (Posted by Microsoft OEM Software on 03/07/2012)
Rating
d7oyEn Thanks so much for the blog post.Really looking forward to read more. Want more.
 
Comment #16  (Posted by Discount OEM Software on 03/07/2012)
Rating
eIpZY5 I loved your blog post. Really Great.
 
Comment #17  (Posted by Discount OEM Software on 03/07/2012)
Rating
I1qenc I value the post.Much thanks again. Keep writing.
 
Comment #18  (Posted by Microsoft OEM Software on 03/08/2012)
Rating
oolcyS Im obliged for the article.Much thanks again. Really Great.
 
Comment #19  (Posted by Microsoft OEM Software on 03/08/2012)
Rating
LgovCc Thanks for the blog article. Awesome.
 
Comment #20  (Posted by Discount OEM Software on 03/08/2012)
Rating
criBPy Really appreciate you sharing this article post.Really looking forward to read more. Really Cool.
 
Comment #21  (Posted by wholesale men clothing on 03/20/2012)
Rating
Im obliged for the post.Really looking forward to read more. Cool.
 
Comment #22  (Posted by Bristol Airport Hotels on 04/18/2012)
Rating
EwQlc3 Say, you got a nice blog post.Really looking forward to read more. Want more.
 
Comment #23  (Posted by Bristol Airport Hotels on 04/18/2012)
Rating
FjJ9X0 Hey, thanks for the blog article.Really thank you! Want more.
 
Comment #24  (Posted by Bristol Airport Hotels on 04/18/2012)
Rating
YtiUi6 wow, awesome blog post.Thanks Again. Really Cool.
 
Sponsored Links