New topic: 

HELP! Handling Multiple Selected Rows in a Listbox - Broken?

<http://forums.realsoftware.com/viewtopic.php?t=29358>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       mpastor           Post subject: HELP! Handling Multiple Selected 
Rows in a Listbox - Broken?Posted: Mon Aug 03, 2009 7:49 am                     
   
Joined: Sat Oct 18, 2008 4:58 pm
Posts: 36              I have a listbox.  It is defined with SelectionType = 1 
(Multiple)
The user selects multiple rows (various ways - click on row-x then shift-click 
on row-y, OR control-click on multiple rows, etc.).
Then I execute the following code:

n=ListBox1.SelCount
MsgBox str(n)+" rows selected"
for i = 0 to Listbox1.ListCount-1
  if ListBox1.Selected(i) Then
    MsgBox "row "+str(i)
  End
Next

No matter how many rows the user selects - the code above correctly reports the 
number of rows selected (from the first MSGBOX), but only reports (from the 
second  MSGBOX) the first row and exits the loop.
It appears that the selected state of the rows is not being persistent, as it 
should be?
I believe this code used to work properly.   
                            Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
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]

Reply via email to