New topic: How to change the ListBox header sort indicator?
<http://forums.realsoftware.com/viewtopic.php?t=29256> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message isomfield Post subject: How to change the ListBox header sort indicator?Posted: Mon Jul 27, 2009 5:36 pm Joined: Sun Oct 07, 2007 8:12 pm Posts: 152 Location: Sydney, Australia Hi, I am loading a ListBox using data that is 'Pre Sorted' using 'ORDER BY' in the SQL SELECT. Is it possible to change the ListBox header appearance to reflect the actual sort order? _________________ Cheers Greg Olson-Hyde RB 2009r2 Pro, Mac OS X 10.5.7 Top patmos Post subject: Re: How to change the ListBox header sort indicator?Posted: Mon Jul 27, 2009 5:47 pm Joined: Sun Jun 29, 2008 10:44 am Posts: 34 Try this: Code:dim theheader as integer=1 //the column from 0 and up dim sortdir as integer=-1 //-1 descending 1=ascending Listbox1.ColumnSortDirection(theheader)=sortdir Listbox1.PressHeader(theheader) This however also sorts the listbox, to prevent that, add this line to the Listbox 'SortColumn' event. Code:Return True Not sure if this is the best way to do this though. Top isomfield Post subject: Re: How to change the ListBox header sort indicator?Posted: Mon Jul 27, 2009 6:04 pm Joined: Sun Oct 07, 2007 8:12 pm Posts: 152 Location: Sydney, Australia Thanks patmos, I had it all except 'PressHeader', I couldn't find the missing ingredient. Thanks again for your help. _________________ Cheers Greg Olson-Hyde RB 2009r2 Pro, Mac OS X 10.5.7 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]
