see:
http://dotnet.aspx.cc/ShowDetail.aspx?id=C81AD80E-FC14-4FF8-85F3-16CC68811BD5

解决方案 »

  1.   

    我的是System.Windows.Forms.ComboBox
      

  2.   

    类windows 资源管理器的实现
      

  3.   

    private void comboBox_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
    {
    Font font=new Font("宋体",8);
    Pen pen = new Pen(Color.Black);
    SolidBrush brushFont = new SolidBrush(Color.Black);
    SolidBrush brushBack = new SolidBrush(Color.White);
    SolidBrush brushFocus = new SolidBrush(Color.SeaShell);
    //画背景
    Rectangle rect=e.Bounds;
    rect.Height-=1;
    if (e.State.ToString().Trim()=="Selected, Focus")
    {
    e.Graphics.FillRectangle(brushFocus,rect);
    }
    else
    {
    e.Graphics.FillRectangle(brushBack,rect);
    } //画图片
    Rectangle rect2=e.Bounds;
    rect2.Inflate(-1,-1);
    rect2.Width=rect2.Height+4; if ((e.Index!=-1) && (e.Index!=this.comboBox.Items.Count-1))
    e.Graphics.DrawImage(this.m_imageList.Images[e.Index],rect2); //输出文字
                if (e.Index!=-1)
                    e.Graphics.DrawString(this.comboBox.Items[e.Index].ToString(),font,brushFont,rect2.Width+8,rect2.Top); }
      

  4.   

    看看这个
    21.5 How do I implement an owner drawn combobox?
    http://www.syncfusion.com/FAQ/WinForms/FAQ_c88c.asp#q547q