Thread: Setting a listview's color

  1. #1
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214

    Setting a listview's color

    hi, does any one know how to change the background color of a listview control in api..i have been searching for hours and found nothing, thanks

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    7
    An excerpt from MSDN:

    ListView.setBackColor

    Sets the background color for the list view control.

    Syntax

    public void setBackColor( Color value )

    Parameters

    value

    A Color object that represents the background color for the list view control. The default value is the system window color.


    hope it helps

  3. #3
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214
    what is ListView thought?
    in ListView.setBackColor

  4. #4
    Registered User Rare177's Avatar
    Join Date
    May 2004
    Posts
    214
    thanks, i found a way to do it

    Code:
    SendMessage(hwndList, LVM_SETBKCOLOR, 0, RGB(0,0,0));
    for backbackground
    and
    Code:
    SendMessage(hwndList, LVM_SETTEXTCOLOR, 0, RGB(255,255,255));
    for text

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Critique my lighting model.
    By psychopath in forum Game Programming
    Replies: 4
    Last Post: 08-12-2006, 06:23 PM
  2. VC++ setting text color of a button
    By 7stud in forum Windows Programming
    Replies: 5
    Last Post: 10-14-2004, 11:04 AM
  3. Setting the background color of my main window
    By Garfield in forum Windows Programming
    Replies: 5
    Last Post: 07-06-2002, 11:25 PM
  4. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 10:19 AM
  5. Setting static text color -- I know I'm doing something wrong
    By Garfield in forum Windows Programming
    Replies: 4
    Last Post: 01-26-2002, 01:59 PM