2011-04-14 70 views
-1

我已经可以正确地绘制ListBox中的DRAWITEM事件列表框项矩形这样绘图列表框项正确vb.net 2005

enter image description here

'// Draw border ACA899 
e.Graphics.DrawRectangle(myPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width,e.Bounds.Height) 

我如何

  1. 位置theitem文字在左中排列?
  2. 更正未显示正确显示的矩形的x2,y2(参见图片)的结尾?
  3. 指定绘制的矩形的厚度?

感谢

+0

的文档束带和DrawRectangle的是上对齐,厚度和边界非常清楚 - 随着例子。你检查过那些吗? – 2011-04-14 23:15:36

+0

我使用visual studio的快速版,并且没有任何文档,在线版本在哪里? – Smith 2011-04-16 08:46:23

+0

msdn.Microsoft.com – 2011-04-16 23:57:01

回答

0

,我发现自己的答案,感谢那些谁帮助

'// Draw border ACA899 
e.Graphics.DrawRectangle(myPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width-1,e.Bounds.Height)