setLVTextItem - Help Needed Still
- Posted by Tony Steward <figjam at nlc.net.au> May 15, 2001
- 385 views
This is a multi-part message in MIME format. ------=_NextPart_000_00ED_01C0DD7C.E36B09E0 charset="iso-8859-1" Hi all, A while ago I asked how can I change the text of the selected row in a list view in a predefined column. Matt Lewis suggested using changeLVItemText(), but I see no such command. Derek I tried your suggestion to no avail. Please look at attached code which is a simple to do list I knocked up so someone can show me how to change the text. The idea is select a list view item click Done button and last column changes to "Done" Can anyone help please as this is holding up a large prog I am writing, at the moment I am re-reading the whole list and when it contains in excess of 1000 lines it takes too long. Especially when all I want to do is change one word. Thanks Tony Steward Come Visit Me At www.locksdownunder.com ------=_NextPart_000_00ED_01C0DD7C.E36B09E0 Content-Type: application/octet-stream; name="TestLV.exw" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="TestLV.exw" -- code generated by Win32Lib IDE v0.10.3 include Win32Lib.ew without warning setWindowBackColor( MainWin,12632256) global constant LV =3D create( ListView, {"Item","Action"}, MainWin, 64, = 8,208, 84,or_all({LVS_REPORT,LVS_SHOWSELALWAYS})) global constant DoneButton =3D create( PushButton, "Done", MainWin, 116, = 112, 90, 30, 0 ) myicon =3D addIcon( extractIcon( "key.ico" )) =20 data =3D { {"Mow Lawns", "To Do"}, {"Fix Fence", "To Do"}, {"Check Tyres", "To Do"} } listid =3D {} for i =3D 1 to length(data) do listid &=3D addLVItem( LV, myicon, data[i][1..2]) end for end procedure onOpen[MainWin] =3D routine_id("MainWin_onOpen") atom id -- rowselected =3D getIndex(LV) -- Does not work itemselected =3D getLVSelected(LV) id =3D listid[itemselected[1]] -- setLVItemText(LV, rowselected[1], 1, "Done")=20 setLVItemText(LV, id, 1, "Done")=20 end procedure onClick[DoneButton] =3D routine_id("DoneButton_onClick") WinMain( MainWin, Normal ) ------=_NextPart_000_00ED_01C0DD7C.E36B09E0--