TabControl & creategraphics()

  • Thread starter Thread starter JH
  • Start date Start date
J

JH

I have a tab control in my form. I am trying to create a dynamic pie chart.
If I use the following code,it works fine on the main form.
this.CreateGraphics().FillPie(brushtargeted,240,200,200, 200, 0,
inttargeted);



However, I want the pie chart to be on tab control area and if I try both of
the following , Idon't see any pie chart. HELP PLEASE



this.tabControl1.CreateGraphics().FillPie(brushtargeted,340,100,200, 200, 0,
inttargeted);

tabControl1.CreateGraphics().FillPie(brushtargeted,340,100,200, 200, 0,
inttargeted);



Newbie to C# here
 
Hello JH,
I think your problem is that you cannot see your pie when you create it
directly on the tabcontrol.
Since your tabcontrol probably contains TabPages you should specify on which
one you want to create it for example:

tabControl1.TabPages[0].CreateGraphics().FillPie( brushtargeted, 24, 20,
200, 200, 0, inttargeted );

would create it on your first tab page.

Vic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top