Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

listbox sorting (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Walking a file system tree?
Next thread: Re: MVC Pattern


Re: REAL and InnoSetup question   -   Garth Hjelte
  listbox sorting   -   E. Tejkowski
   Re: listbox sorting   -   Terry Ford
   Re: listbox sorting   -   Terry Ford
   Re: listbox sorting   -   E. Tejkowski
   Re: listbox sorting   -   E. Tejkowski
   Re: listbox sorting   -   Terry Ford
   Re: listbox sorting   -   E. Tejkowski

listbox sorting
Date: 02.08.10 13:49 (Mon, 2 Aug 2010 07:49:01 -0500)
From: E. Tejkowski
How does one sort a listbox via code and have the correct column header display colors as if it had been clicked? I've set SortedColumn and ColumnSortDirection and called sort, and indeed the sort works, but the wrong column header is displayed as selected. I want to sort a different column than the last one the user had clicked. When I sort via code, the last-clicked column header is still blue. Any ideas?

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox sorting
Date: 02.08.10 17:42 (Mon, 2 Aug 2010 09:42:40 -0700)
From: Terry Ford

On Aug 2, 2010, at 8:12 AM, E. Tejkowski wrote:

> On Aug 2, 2010, at 9:48 AM, E. Tejkowski wrote:
>> On Aug 2, 2010, at 9:21 AM, Terry Ford wrote:
>>> Did you try to set the HeadingIndex property to -1 after the sort?
>>
>> I had considered that, but the lang ref says "This property is obsolete.", so I was reticent to use it. Maybe I'll give it a try anyway.
>
>
> Oops, I had a Palin moment there… of course I meant reluctant, not reticent. :)

The docs could probably not be modified yet because of RS's reticence in this matter. ;-)

Actually, the method of code sorting has changed but the HeadingIndex is still useful for other less common things that are not documented but work.

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox sorting
Date: 02.08.10 17:34 (Mon, 2 Aug 2010 09:34:02 -0700)
From: Terry Ford

On Aug 2, 2010, at 7:48 AM, E. Tejkowski wrote:

> On Aug 2, 2010, at 9:21 AM, Terry Ford wrote:
>> Did you try to set the HeadingIndex property to -1 after the sort?
>
> I had considered that, but the lang ref says "This property is obsolete.", so I was reticent to use it. Maybe I'll give it a try anyway.

That obsolete notice in the docs is now obsolete and should have been removed. The HeadingIndex property still works and is necessary for many ListBox handling things like disabling sorting header indication when sorting is disabled. The replacements suggested never stopped the header from coloring.

If you want the column, other than the actual sorted one to indicate sorted, it also may be useful although I am not certain to what it will show as I never have used it that way.

Best,

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox sorting
Date: 02.08.10 16:12 (Mon, 2 Aug 2010 10:12:04 -0500)
From: E. Tejkowski
On Aug 2, 2010, at 9:48 AM, E. Tejkowski wrote:
> On Aug 2, 2010, at 9:21 AM, Terry Ford wrote:
>> Did you try to set the HeadingIndex property to -1 after the sort?
>
> I had considered that, but the lang ref says "This property is obsolete.", so I was reticent to use it. Maybe I'll give it a try anyway.

Oops, I had a Palin moment there… of course I meant reluctant, not reticent. :)
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox sorting
Date: 02.08.10 15:48 (Mon, 2 Aug 2010 09:48:33 -0500)
From: E. Tejkowski
On Aug 2, 2010, at 9:21 AM, Terry Ford wrote:
> Did you try to set the HeadingIndex property to -1 after the sort?

I had considered that, but the lang ref says "This property is obsolete.", so I was reticent to use it. Maybe I'll give it a try anyway.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox sorting
Date: 02.08.10 15:21 (Mon, 2 Aug 2010 07:21:43 -0700)
From: Terry Ford

On Aug 2, 2010, at 5:49 AM, E. Tejkowski wrote:

> How does one sort a listbox via code and have the correct column header display colors as if it had been clicked? I've set SortedColumn and ColumnSortDirection and called sort, and indeed the sort works, but the wrong column header is displayed as selected. I want to sort a different column than the last one the user had clicked. When I sort via code, the last-clicked column header is still blue. Any ideas?

Did you try to set the HeadingIndex property to -1 after the sort?

Terry

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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: listbox sorting
Date: 03.08.10 15:16 (Tue, 3 Aug 2010 09:16:11 -0500)
From: E. Tejkowski
On Aug 2, 2010, at 11:42 AM, Terry Ford wrote:

> The docs could probably not be modified yet because of RS's reticence in this matter. ;-)
> Actually, the method of code sorting has changed but the HeadingIndex is still useful for other less common things that are not documented but work.

That worked for me. Thanks Terry!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>