how to chage the color (back + button) of a combo1 ? any suggestion ... ?
Printable View
how to chage the color (back + button) of a combo1 ? any suggestion ... ?
Here's a LISTVIEW, but it should be similar:
Not easy, anyways...Code:Option Explicit
Private Sub Form_Load()
ListView1.FullRowSelect = True
ListView1.View = lvwReport
Dim itmX As ListItem ' Create a variable to add ListItem objects.
Dim clmX As ColumnHeader ' Create an object variable for the ColumnHeader object.
' Add ColumnHeaders.
Set clmX = ListView1.ColumnHeaders.Add(, , "Column 1", ListView1.Width / 3)
Set clmX = ListView1.ColumnHeaders.Add(, , "Column 2", ListView1.Width / 3)
Set clmX = ListView1.ColumnHeaders.Add(, , "Column 3", ListView1.Width / 3)
ListView1.BorderStyle = ccFixedSingle ' Set BorderStyle property.
ListView1.View = lvwReport ' Set View property to Report.
' Add a main item
Set itmX = ListView1.ListItems.Add(, , "First value")
' Add two subitems for that item
itmX.SubItems(1) = "First value subitem 1"
itmX.SubItems(2) = "First value subitem 2"
' Add another main item
Set itmX = ListView1.ListItems.Add(, , "Second value")
' Add two subitems for that item
itmX.SubItems(1) = "Second value subitem 1"
itmX.SubItems(2) = "Second value subitem 2"
' Add another main item
Set itmX = ListView1.ListItems.Add(, , "Third value")
' Add two subitems for that item
itmX.SubItems(1) = "Third value subitem 1"
itmX.SubItems(2) = "Third value subitem 2"
ReDim Preserve clr(ListView1.ListItems.Count)
'Initialise the subclassing
g_MaxItems = ListView1.ListItems.Count - 1
g_addProcOld = SetWindowLong(hWnd, GWL_WNDPROC, AddressOf WindowProc)
End Sub
Private Sub Form_Unload(Cancel As Integer)
SetWindowLong hWnd, GWL_WNDPROC, g_addProcOld
End Sub
Private Sub ListView1_Click()
If ListView1.SelectedItem.Index < 0 Then Exit Sub
SetLIBackColor ListView1, ListView1.SelectedItem.Index, vbRed
End Sub
well... i will try...
thanks a lot