New topic: 

Reading unchecked ListBox items

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

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        vkozme          Post subject: Reading unchecked ListBox 
itemsPosted: Sat May 05, 2012 9:59 pm                         
Joined: Fri Oct 21, 2005 7:51 pm
Posts: 219                Hi, guys,

I have the following code that is working

For i=0 to ListBox1.ListCount-1
  
  if ListBox1.CellCheck(i,0) then
  ObjectivesCompleted = ObjectivesCompleted + str(Listbox1.Cell(i,0)) + 
EndOfLine
  end


How can I do the same thing with unchecked items?

Thank you in advance.

vkozme   
                             Top                dizco          Post subject: 
Re: Reading unchecked ListBox itemsPosted: Sat May 05, 2012 10:15 pm            
             
Joined: Sat May 05, 2012 8:59 pm
Posts: 3                I believe you could use an ELSE?

For i=0 to ListBox1.ListCount-1
  
  if ListBox1.CellCheck(i,0) then
  ObjectivesCompleted = ObjectivesCompleted + str(Listbox1.Cell(i,0)) + 
EndOfLine
  else
  //put what you want it to do here
  end


Hope this helps

Dizco      
_________________
Just a normal guy who loves coding  
                             Top                DaveS          Post subject: 
Re: Reading unchecked ListBox itemsPosted: Sat May 05, 2012 10:38 pm            
                     
Joined: Sun Aug 05, 2007 10:46 am
Posts: 3653
Location: San Diego, CA                For i=0 to ListBox1.ListCount-1
  
  if NOT ListBox1.CellCheck(i,0) then
  ObjectivesCompleted = ObjectivesCompleted + str(Listbox1.Cell(i,0)) + 
EndOfLine
  end
      
_________________
Dave Sisemore
MacPro, OSX 10.7.3 RB2011r3
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             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