Solved

Drawing on a TabControl?

Posted on 2006-06-15
1
1,184 Views
Last Modified: 2008-03-17
Hi

I did

protected override void OnPaint(PaintEventArgs pe)
        {            
            Graphics g = pe.Graphics;

g.DrawRectangle(penpieblack, x + 150, y, 20, 20);

In an old program and it worked fine.

Now I have a tabcontrol and three tabs within it.

Is there a special way to specify where to draw the data?
Ill only want it on one of the three pages in the tab control

Thanks
Boof
0
Comment
Question by:boofulls
1 Comment
 
LVL 2

Accepted Solution

by:
Anandavally_P earned 20 total points
ID: 16910348
Try this:
First add a tab control with tabpages on it.
Add a PictureBox to one of the tab pages.

In the paint event of the PictureBox we can add the following code to draw a string.

 private void pictureBox1_Paint(object sender, PaintEventArgs e)
 {
      Graphics g = e.Graphics;
      g.DrawString("This is the new string drawn",new Font("Arial",10),Brushes.Blue,new
                            Point(30,30));
 }

Thanks
Anandavally P
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question