New topic: 

listbox sorting

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

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        DanSandbergUCONN          Post subject: listbox sortingPosted: 
Mon Jan 07, 2013 3:53 pm                         
Joined: Fri Dec 21, 2007 9:50 am
Posts: 213                Hi All - 

I have a listbox and I wanted to turn off sorting completely. I attempted to do 
this by putting return trueinside the compareRows method of the listbox. The 
result is that the column DOES NOT sort when I initially click the column 
header but it DOES sort the second time I click it (i.e. after it has focus) 
and then it DOES NOT sort on subsequent clicks. 

So two questions: 1) How do I turn off sorting for my listbox completely and 2) 
what the heck is going on with the program as is?

Thanks in advance!

-Dan

p.s. I tried amending the CompareRows event code to result=0
return true
   
                             Top                jakuno          Post subject: 
Re: listbox sortingPosted: Mon Jan 07, 2013 4:15 pm                         
Joined: Fri Aug 31, 2012 3:56 pm
Posts: 57                1)

Function HeaderPressed(column as Integer) As Boolean
  Return true
End Function


 OR

Function MouseDown(x As Integer, y As Integer) As Boolean
  Return y < me.HeaderHeight
End Function


 OR

HasHeading = false + draw your own header in a Canvas.   
                             Top                doofus          Post subject: 
Re: listbox sortingPosted: Mon Jan 07, 2013 8:15 pm                             
    
Joined: Thu Sep 10, 2009 2:50 am
Posts: 331
Location: Santa Cruz, CA, USA                try
Listbox1.HeaderType(-1) = Listbox.HeaderTypes.NotSortable
see HeaderTypes here http://docs.realsoftware.com/index.php/Listbox   
                             Top                jakuno          Post subject: 
Re: listbox sortingPosted: Tue Jan 08, 2013 5:16 am                         
Joined: Fri Aug 31, 2012 3:56 pm
Posts: 57                doofus wrote:try
Listbox1.HeaderType(-1) = Listbox.HeaderTypes.NotSortable
see HeaderTypes here http://docs.realsoftware.com/index.php/Listbox
Clearly the best way to Rome.   
                             Top                DanSandbergUCONN          Post 
subject: Re: listbox sortingPosted: Tue Jan 08, 2013 10:43 am                   
      
Joined: Fri Dec 21, 2007 9:50 am
Posts: 213                Thanks guys. There is no HeaderTypes in the listbox 
language ref on my distro but I'm running an old version (2007R4)   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 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