New topic: 

Remove Selected item in list box

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

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        JayBird          Post subject: Remove Selected item in list 
boxPosted: Mon Oct 22, 2012 4:35 pm                         
Joined: Thu Mar 17, 2011 6:12 pm
Posts: 63                Hi All,

Ive looked at the method here: listbox.removerow and checked on a few websites, 
but i cannot figure out the answer 

I have a list box with 3 items. I am trying to remove a selected item. In this 
case item 2. Can anyone direct me to the correct place to figure out what to do?

List box:

item 1
item 2
Item 3

Submit Button -> this is pressed and the selected item is removed

Ive tried  listbox.removerow(0) - this just removes the 1st item in listbox.   
                             Top                griffitts          Post 
subject: Re: Remove Selected item in list boxPosted: Mon Oct 22, 2012 4:39 pm   
                      
Joined: Mon Oct 16, 2006 4:06 pm
Posts: 107
Location: Fort Worth, TX                The zero in listbox.removerow(0) is the 
row number to remove. The list starts with zero so use removerow(1) to get rid 
of the second item.   
                             Top                JayBird          Post subject: 
Re: Remove Selected item in list boxPosted: Mon Oct 22, 2012 4:40 pm            
             
Joined: Thu Mar 17, 2011 6:12 pm
Posts: 63                Hey griffins

The issue here is that the list box is going to be populated with more than say 
3 items in the future, i need some way of once clicked knowing what the row 
value is.   
                             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]

Reply via email to