On 26 Mar 2006, at 15:46, Thom McGrath wrote:

I'm trying to save the information about a listbox's customization. The user can resize the columns and sort them. So I'm saving all this data to my preferences when the window closes. All seems to be well, but I can't get the selected column to appear selected when I reopen the window. The data *is* sorted correctly, but none of the headers are selected. Here is some code:

// Window Close
preferences.integervalue("Clipboard Sort Column") = pageslist.sortedcolumn preferences.integervalue("Clipboard Sort Direction") = pageslist.columnsortdirection(pageslist.sortedcolumn) preferences.integervalue("Clipboard Scroll Position") = pageslist.scrollposition preferences.stringvalue("Clipboard Column Widths") = pageslist.columnwidths

// Window Open
pageslist.sortedcolumn = preferences.integervalue("Clipboard Sort Column") pageslist.columnsortdirection(pageslist.sortedcolumn) = preferences.integervalue("Clipboard Sort Direction",listbox.SortDescending) pageslist.columnwidths = preferences.stringvalue("Clipboard Column Widths","50,,50,100")
  // Populate pageslist
pageslist.scrollposition = preferences.integervalue("Clipboard Scroll Position")

pageslist is sorted after being populated.


You need to set the ListBox's HeaderIndex to the column being sorted.

--
Ian M. Jones
___________________________________
IMiJ Software
http://www.imijsoft.com
http://www.ianmjones.net (blog)


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to