تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
(تم الحل) سؤل فى أداه ListBox
#5
tariq2812 كتب :
PHP كود :
Private Sub ListBox1_DrawItem(ByVal sender As System.ObjectByVal e As System.Windows.Forms.DrawItemEventArgsHandles ListBox1.DrawItem
        e
.DrawBackground()
        If (
e.State And DrawItemState.Selected) = DrawItemState.Selected Then
            e
.Graphics.FillRectangle(Brushes.Rede.Bounds)
        
End If
        
Using b As New SolidBrush(e.ForeColor)
            
e.Graphics.DrawString(ListBox1.GetItemText(ListBox1.Items(e.Index)), e.Fontbe.Bounds)
        
End Using
        e
.DrawFocusRectangle()

    
End Sub 

مشكور لكن يجب تعديل الDrawMode الى OwnerDrawFixed
PHP كود :
ListBox1.DrawMode DrawMode.OwnerDrawFixed 

كما موضح بالمثال السابق

تحياتي لك
ابو سامي
[صورة مرفقة: 27_01360671789.png]
}}}
تم الشكر بواسطة:


الردود في هذا الموضوع
(تم الحل) سؤل فى أداه ListBox - بواسطة tariq2812 - 01-10-12, 02:23 PM
(تم الحل) سؤل فى أداه ListBox - بواسطة m.sami.ak_mybb_import4434 - 01-10-12, 03:18 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم