New topic: select multiple rows in listbox without command clicking
<http://forums.realsoftware.com/viewtopic.php?t=47532> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message jojoSATX Post subject: select multiple rows in listbox without command clickingPosted: Sun Apr 07, 2013 8:46 am Joined: Sat Jun 23, 2007 12:44 pm Posts: 42 I'm having difficultly selecting multiple rows in listbox without command clicking or right clicking on each row. I'd like to just click a row and select it, then click another row and select that row as well and so on. If the row is already selected, of course I'd like to unselect it. (Probably simple but haven't opened RB in years and have a project I need to do) Top kermit Post subject: Re: select multiple rows in listbox without command clickingPosted: Sun Apr 07, 2013 8:57 am Joined: Mon May 30, 2011 12:56 am Posts: 664 The operating system will conspire against you. But heres an idea: When you click, you get a change event. When that happens, check the row's rowtag. If it is null or false, set it to TRUE If it was TRUE, set it to FALSE Then , iterate through every row of the listbox and set the selected property of each row to match the rowtag. Top jojoSATX Post subject: Re: select multiple rows in listbox without command clickingPosted: Sun Apr 07, 2013 12:59 pm Joined: Sat Jun 23, 2007 12:44 pm Posts: 42 thanks for responding... I just figured where my problem was... Adding the following to CellClick event: if me.Selected(row) then Me.Selected(row) = FALSE Else Me.Selected(row) = TRUE end if Return True (It wouldn't work until returning true and thats what had me stuck) Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
