using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Diagnostics.CodeAnalysis; using System.Windows.Forms.VisualStyles; using System.Drawing.Drawing2D; using System.Globalization; namespace WindowsFormsApplication10 { public partial class Form2 : Form { Font drawFont = new Font("Tahoma", 9,FontStyle.Bold); StringFormat Format = new StringFormat(StringFormatFlags.DirectionRightToLeft); public Form2() { InitializeComponent(); } void onDrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e) { Format.LineAlignment = StringAlignment.Center; Format.Alignment = StringAlignment.Center; e.Graphics.FillRectangle(Brushes.LightSteelBlue, e.Bounds); e.Graphics.DrawString(e.Header.Text, Font, Brushes.Black, e.Bounds, Format); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)