New topic: ListIndex not behaving as expected
<http://forums.realsoftware.com/viewtopic.php?t=25800> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message Paul Burnside Post subject: ListIndex not behaving as expectedPosted: Sun Dec 28, 2008 2:19 pm Joined: Mon May 08, 2006 8:50 pm Posts: 261 I have a listbox that is populated form a recordset. Records from the recordset are extracted to fill the listbox with only enough records to fill the visible number of rows. The listbox is not in the editable mode. When I click on any row in the listbox I have tried to display the selected listbox row by using the ListIndex. However, it takes two clicks of the mouse to produce the proper ListBox Row. The following is partial code in the CellClick Event. Code:EditField2.text=str(me.listindex) Based on the Language Reference this should give me the visible row selected in the listbox but, as I said, it takes two clicks of the mouse in the same row to produce the proper visible row number. I'm not seeking the row number of the recordset, only the visible row number in the listbox. Can anyone tell me what I'm doing wrong. I don't think I should have to keep track of the previously selected row to use ListIndex. Top Steve Garman Post subject: Re: ListIndex not behaving as expectedPosted: Sun Dec 28, 2008 2:22 pm Joined: Fri Sep 30, 2005 3:53 pm Posts: 2551 Location: England I don't think ListIndex is changed until after Cellclick has fired. However, Cellclick provides parameters Row and Column Have you triedCode:EditField2.text=str(row) _________________ Steve Garman Using REALbasic 2008r2 Professional on Windows Vista Ultimate Occasional blog Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
