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.
 
Back
Top