Hi Steve,
As Charles indicated, you can use HeadingIndex(), but since it's
deprecated, I try to avoid that.
What I have found is that PressHeader doesn't do what you want when
you have already set SortedColumn to the header you're about to
"press" using PressHeader. I think you'll find that if you set your
SortedColumn to a different column, PressHeader will work as you expect.
I have written a ListBox class that basically implements a
"HighlightHeader" method, but it's not very portable because it
relies on the ListBox having at least one zero-width column.
Steve
====================================================
== Stephen E. Hutson, AquilaDigital Partnership ==
== http://www.adpartnership.net ==
====================================================
On Oct 17, 2006, at 10:45 p.m., Steve Roy wrote:
I have been struggling with this for a while. When my window opens,
the listbox is empty of content yet, but I still want it to show
which column is sorted and what the sort order is. On Mac OS X this
is denoted by the column heading being blue. I seem to remember
that with RB 5.5 I was able to make my listbox header look sorted
by calling PressHeader but for some reason I'm unable to make this
work now with 2006r4.
The official method is to do this:
MyListbox.ColumnSortDirection(0) = Listbox.SortAscending
MyListbox.SortedColumn = 0
MyListbox.Sort()
But I have this code in the Open event of my window and the window
still comes up with the listbox without sorted header.
Any other idea everyone?
I should mention that I searched the archives and that there are
many results, but none that is a decisive answer. Mostly the usual
answer is to do the above, but that doesn't solve the header look
problem.
Steve
--
Steve Roy
<http://homepage.mac.com/sroy>
_______________________________________________
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>
_______________________________________________
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>