01-10-12, 12:41 AM (آخر تعديل لهذه المشاركة : 01-10-12, 01:39 AM {2} بواسطة Fathy.)
هل يمكن ان اغير الون الازرق الى على الكلمه فى Listbox ؟ وى هل يمكن تقصير هذا الخط على اد الكلمه؟ وى كيف تعطيل زرRight Arrow انو ينتقل لى الكلمه التاليه
Private Sub ListBox1_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ListBox1.DrawItem
e.DrawBackground()
If (e.State And DrawItemState.Selected) = DrawItemState.Selected Then e.Graphics.FillRectangle(Brushes.Red, e.Bounds)
End If
Using b As New SolidBrush(e.ForeColor)
e.Graphics.DrawString(ListBox1.GetItemText(ListBox1.Items(e.Index)), e.Font, b, e.Bounds)
End Using
e.DrawFocusRectangle()
Private Sub ListBox1_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ListBox1.DrawItem e.DrawBackground() If (e.State And DrawItemState.Selected) = DrawItemState.Selected Then e.Graphics.FillRectangle(Brushes.Red, e.Bounds) End If Using b As New SolidBrush(e.ForeColor) e.Graphics.DrawString(ListBox1.GetItemText(ListBox1.Items(e.Index)), e.Font, b, e.Bounds) End Using e.DrawFocusRectangle()