IonicWind Software

IWBasic => General Questions => Topic started by: Andy on January 08, 2019, 07:11:29 am

Title: Listview colour
Post by: Andy on January 08, 2019, 07:11:29 am
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.

Title: Re: Listview colour
Post by: LarryMc on January 08, 2019, 01:05:50 pm
this program shows how to color a cell in a listview
Title: Re: Listview colour
Post by: Andy on January 09, 2019, 04:35:29 am

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.