listview "Column name" Font Change in C# windows form

i want the listview colmn name to be of font 8 and i want the rest of the rows to be of 12 font can any one can help me abt this
kranthi4uonlyAsked:
Who is Participating?
 
RedKelvinConnect With a Mentor Commented:
Ok, sorry disregard that,

you need to set ownerDraw for your listview to true, and subscribe to the DrawColumnHeader event

            this.listView1.OwnerDraw = true;
            this.listView1.DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(listView1_DrawColumnHeader);

and define the event

        void listView1_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
        {
            using (StringFormat sf = new StringFormat())
            {
                // Draw the header text.
                using (Font headerFont = new Font("Helvetica", 8, FontStyle.Bold))
                {
                    e.Graphics.DrawString(e.Header.Text, headerFont,
                        Brushes.Black, e.Bounds, sf);
                }
            }
        }

http://msdn2.microsoft.com/en-us/library/system.windows.forms.listview.drawcolumnheader.aspx
0
 
RedKelvinCommented:
Hi there,
I think you will need to start with this,
http://www.codeproject.com/cs/miscctrl/customheader.asp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.