April 18, 2024, 04:36:03 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Listview colour

Started by Andy, January 08, 2019, 07:11:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

Well I'm just playing around with the constants search program to see if I can make it even easier to use.

I came upon an idea where you could search the list view for part of a constant name e.g. "SET".

Now I use LVM_ENSUREVISIBLE to make the list view scroll down to the first instance of "SET" it finds in the constants names, but I'm not actually selecting the position as this would add it to the search history - and I don't want that.

I know there is an example of setting a row of a list view colour in the examples for IWB, but that depends on the user clicking the list.

So the question is... can I set the list view row with a colour without a click?

Attached is the constants search program V6.2

To use it, you will see two edit boxes at the bottom of the screen, set your option 1 search to WINDOWS and MESSAGES
then in the second edit box (next to "<" " >" at the bottom) type in SET - you will see it jump to the first instance of the word "SET" in the listed constants names.

But I would love to be able to colour this row.

Can this be done?

Line No 884 is where it does the search.

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

this program shows how to color a cell in a listview
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Larry,

Thanks for that, yes I know about the listview no resize example, but it only gets me so far.

Brian and Bill have emailed examples and after looking at both (thanks guys!) I'm trying Brian's code as it's the easier of the two and I'm getting there with it.

just need to figure out how to reset all items to their default colour now.

Thanks,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.