1. Changing icon in a Listview & Sorting
- Posted by Tony Steward <figjam at nlc.net.au> Apr 10, 2001
- 483 views
G'Day all, Firstly Is it possible to manually (by code) trigger the sorting of a listview like when you click on the column title. Secondly When my listview loads if condition A then that row has icon A. if condition B then that row has icon B. Is it possible to change the icon assigned to a row after the listview has loaded, without reloading the whole listview. Thanks Tony Steward Come Visit Me At www.locksdownunder.com
2. Re: Changing icon in a Listview & Sorting
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 10, 2001
- 486 views
G'day Tony, > Is it possible to manually (by code) trigger the sorting of a listview like > when you click on the column title. In v056 it will be. There is a function to add your own sort routine. > Secondly > When my listview loads if condition A then that row has icon A. > if condition B then that row has icon B. > Is it possible to change the icon assigned to a row after the listview has > loaded, without reloading the whole listview. ---------- Try this code - I haven't yet ----------- procedure setLVImage(integer id, integer image, integer item) atom LVITEM LVITEM = struct_LVITEM( LVIF_IMAGE, item - 1, 0, 0, 0, 0, image, 0) RC = sendMessage(id, LVM_SETITEM, 0, LVITEM) release_mem(LVITEM) end procedure ---------------------------- where 'id' is the listview control id, 'image' is the value returned by addIcon() 'item' is the value returned by addLVItem() I think this is the right code but I can't test it yet. --------------- ------ Derek Parnell Melbourne, Australia "To finish a job quickly, go slower."