当前位置:编程学习 > C#/ASP.NET >>

c# listbox自绘问题


没有滚动条显示正常




出现滚动条 右侧显示不正常 --------------------编程问答-------------------- --------------------编程问答-------------------- 有没有用皮肤包 --------------------编程问答-------------------- 模式是OwnerDrawVariable啊

这东西跟itemheight有关吧

翻页了itemheight就乱掉了 --------------------编程问答--------------------         private void listBox1_DrawItem(object sender, DrawItemEventArgs e) {
            e.Graphics.FillRectangle(e.Bounds);
            e.Graphics.DrawString("xx", listBox1.Font, Brushes.Black, e.Bounds.Left, e.Bounds.Top); 
        }

建议你先把bounds画出来,看下具体的位置,是什么引起的。 
你的代码是不是没有判断边界?
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,