Hello everyone,
I posted my request earlier in this thread. Post #8
@SamOscarBrown
Thank you.
I am so happy to become a member of this community. As suggested by you, I am starting this new thread.
My requirement:
I want to be able to set the backcolor of any row in a ListBOX. A Listview is actually an overkill for me.
I found this interesting article about just that. Scroll down to the very bottom and you will find what exactly I am looking for.
Surprisingly, the download link for the example code is also still active. I tried it out. It works just as it says but that's it. You try tinkering anything with it, it hangs.
Then I found this https://www.vbforums.com/showthread....t-subclassing) suggested in #4
This is a beauty. It works well. But I can't use it because it doesn't work with Krool's Listview.
I like to use Krool's controls in order to make a single executable without any dependencies.
Apparently, there is a bug in the Picture property of Krool's Lisview, or I am missing something. Because, that is where the code in the above example, fails.
When you execute
, nothing happens. I tried various other ways of assigning the picture. Still nothing.
Then I found, even when you assign a picture at design time, it does not work.
I tried setting the PictureWatermark property = True. That also doesn't work.
You can see the difference at Design time. I have assigned the same picture to both MS Listview (top) and Krool's Listview (bottom).
![Name: krool.jpg
Views: 32
Size: 26.8 KB]()
So, I am pinning my hopes on the method suggested by Krool, in #5.
Re: listview row color
You could take the ListView control from my CommonControls replacement project.
Click here.
It supports a BackColor (via the "ItemBkColor" event) for the ListItems. (and many other features more)
I have absolutely no idea how to use achieve that.
Over to you all, for your suggestions.
Thanks.
I posted my request earlier in this thread. Post #8
@SamOscarBrown
Thank you.
I am so happy to become a member of this community. As suggested by you, I am starting this new thread.
My requirement:
I want to be able to set the backcolor of any row in a ListBOX. A Listview is actually an overkill for me.
I found this interesting article about just that. Scroll down to the very bottom and you will find what exactly I am looking for.
Surprisingly, the download link for the example code is also still active. I tried it out. It works just as it says but that's it. You try tinkering anything with it, it hangs.
Then I found this https://www.vbforums.com/showthread....t-subclassing) suggested in #4
This is a beauty. It works well. But I can't use it because it doesn't work with Krool's Listview.
I like to use Krool's controls in order to make a single executable without any dependencies.
Apparently, there is a bug in the Picture property of Krool's Lisview, or I am missing something. Because, that is where the code in the above example, fails.
When you execute
Code:
kroolListview.picture = picbg.image
Then I found, even when you assign a picture at design time, it does not work.
I tried setting the PictureWatermark property = True. That also doesn't work.
You can see the difference at Design time. I have assigned the same picture to both MS Listview (top) and Krool's Listview (bottom).
So, I am pinning my hopes on the method suggested by Krool, in #5.
Quote:
Re: listview row color
You could take the ListView control from my CommonControls replacement project.
Click here.
It supports a BackColor (via the "ItemBkColor" event) for the ListItems. (and many other features more)
Over to you all, for your suggestions.
Thanks.