May 10, 2024, 02:11:41 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Listview Color

Started by Bruce Peaslee, November 18, 2007, 11:06:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bruce Peaslee

I can't get the listview to change color  :-\


Select @MESSAGE
   Case @IDINITDIALOG
      SendMessage dlgListVoters,@LVM_SETEXTENDEDLISTVIEWSTYLE,0, _
         @LVS_EX_FULLROWSELECT|@LVS_EX_GRIDLINES|@LVS_EX_LABELTIP, _
         LP_LVW_LIST
      CenterWindow dlgListVoters
      ControlCmd dlgListVoters, LP_LVW_LIST, @LVINSERTCOLUMN, 0, "#"
      ControlCmd dlgListVoters, LP_LVW_LIST, @LVINSERTCOLUMN, 1, "Name"
      ControlCmd dlgListVoters, LP_LVW_LIST, @LVINSERTCOLUMN, 2, "Status"
      ControlCmd dlgListVoters, LP_LVW_LIST, @LVSETCOLWIDTH,  0,   0 /* thus hidden */
      ControlCmd dlgListVoters, LP_LVW_LIST, @LVSETCOLWIDTH,  1, 235
      ControlCmd dlgListVoters, LP_LVW_LIST, @LVSETCOLWIDTH,  2, 174
      SetFont dlgListVoters, "", 10, 700, 0, LP_LBL_HEADING
      SetControlColor(dlgListVoters, LP_LBL_HEADING, @BLUE, GetSysColor(15))
      SetControlColor(dlgListVoters, LP_LVW_LIST,    @BLUE, RGB(127,127,127))
      Populate_dlgListVoters()
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

mrainey

This gets the background color.


SetID "LVM_SetTextBKColor",4134

SendMessage(WinName,@LVM_SetTextBKColor,0,OffWhite,ListviewName)
Software For Metalworking
http://closetolerancesoftware.com

Bruce Peaslee

November 18, 2007, 11:23:05 AM #2 Last Edit: November 18, 2007, 11:45:48 AM by peaslee
Thanks. I was working on that angle: using SendMessage.


SendMessage dlgListVoters, @LVM_SETTEXTBKCOLOR, 0, GetSysColor(15), LP_LVW_LIST
SendMessage dlgListVoters, @LVM_SETTEXTCOLOR, 0, @BLUE, LP_LVW_LIST


Add this to match the control background color to the text background color to make the effect complete:


SendMessage dlgListVoters, @LVM_SETBKCOLOR,0, RGB(218,218,218), LP_LVW_LIST
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles