2011-04-14 76 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)