Solved

Drawing on a TabControl?

Posted on 2006-06-15
1
1,179 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ConsoleSql 1 34
bulid json format 3 45
How to avoid saving tif files a 2nd time using VS2015 and C#? 1 27
Filename to be appended with DateTimeof Download 3 40
Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

929 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now