Board index » delphi » ListView, update selected items bug?

ListView, update selected items bug?

My program modifies some item.selected values and I want the newly
selected items to have the customary highlighted background.  I've tried
update,refresh,and all other methods (I think?) to get the items to show
up as selected.  They only show up selected when I click on the listview
list.  Then of course they are all quickly unselected.

This is annoying... any help please? :)

Alex.
--

Quote
>))Schon...@Engr.OrSt.Edu

)>)"No *happy campers* any more..." -The Orz
)>)http://www.orst.edu/~schonfea/
Quote
>))ftp://ftp.itis.com/pub/deckmaster/misc/utilities/pc/udck212s.zip

 

Re:ListView, update selected items bug?


On 17 Jun 1996 21:04:25 GMT, schon...@flop.ENGR.ORST.EDU (Alexander

Quote
Schonfeld) wrote:
>My program modifies some item.selected values and I want the newly
>selected items to have the customary highlighted background.  I've tried
>update,refresh,and all other methods (I think?) to get the items to show
>up as selected.  They only show up selected when I click on the listview
>list.  Then of course they are all quickly unselected.

>This is annoying... any help please? :)

>Alex.
>--
>>))Schon...@Engr.OrSt.Edu
>)>)"No *happy campers* any more..." -The Orz
>)>)http://www.orst.edu/~schonfea/
>>))ftp://ftp.itis.com/pub/deckmaster/misc/utilities/pc/udck212s.zip

Just set ListBox1.ItemIndex to the item you want highlighted.
However, you better not being doing anything on OnClick event that
would disable the highlighting (such as updating items).

Other Threads