How to change the ListView BackGround color?

 

Hello.

I'm using the mql4 standard library and using CListView created a list.

Can somebody please tell me how can I change the listview background?

To avoid misunderstandings, I mean, it's white by default and I want to change its color totally. I don't mean to change the border color or the selected item.

I want to change all its body's color except the scroll and the text.

Any help would be appreciated.

Regards



Edit:

This is a simple example. When I use its direct backgorund color method this is what happens:

int OnInit()
  {
   chartID = ChartID();
//---
   Interface.Create(chartID, "Interface", 0, 100, 5, 350, 300);
//---
   List.Create(chartID, "List", 0, 2, 2, 240, 150);
  //---
   List.ColorBackground(clrRed);
  //---
   List.AddItem("A");
   List.AddItem("B");
   List.AddItem("C");
   List.AddItem("D");
   List.AddItem("E");
   List.AddItem("F");
   List.AddItem("G");
   List.AddItem("H");
   List.AddItem("I");
   List.AddItem("J");
   List.AddItem("K");
//---
   Interface.Add(List);
   Interface.Run();
   return(INIT_SUCCEEDED);
  }


 
Reza nasimi:

Hello.

I'm using the mql4 standard library and using CListView created a list.

Can somebody please tell me how can I change the listview background?

To avoid misunderstandings, I mean, it's white by default and I want to change its color totally. I don't mean to change the border color or the selected item.

I want to change all its body's color except the scroll and the text.

Any help would be appreciated.

Regards



Edit:

This is a simple example. When I use its direct backgorund color method this is what happens:


Dear Reza :)

Do you try to edit Defines.mqh file?

or try this :

#include <Controls\Defines.mqh>
#undef   CONTROLS_LISTITEM_COLOR_BG
#undef   CONTROLS_LISTITEM_COLOR_BG
#define CONTROLS_LISTITEM_COLOR_BG          clrMagenta
#define CONTROLS_LIST_COLOR_BG              clrMagenta



 
Koros Jafarzadeh:

Dear Reza :)

Do you try to edit Defines.mqh file?

or try this :



Hi koros
Thank you very much.
No I apparently was checking a wrong place, thanks.

Reason: