• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Ideas for sorting a multi-column list box

Community Expert ,
Oct 31, 2017 Oct 31, 2017

Copy link to clipboard

Copied

I am working on a prototype script that displays a multi-column list box of items with headers. I would like to implement a sort by clicking on the header that I want to sort on. I have the sort code developed but I am trying to figure out a good way to detect a column click on the header so I can implement the sort. Any suggestions would be appreciated. Here is a screenshot of my (rough) dialog box. Thank you very much. -Rick

DeleteMe.png

TOPICS
Scripting

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2017 Oct 31, 2017

Copy link to clipboard

Copied

This is a ScriptUI window with a listbox with column titles, correct? If that's the case you're out of luck: the column titles aren't sensitive to onClick or onChange. You might define an event listener that determines where on the window you click and deduct which column that must be. It seems easier simply to add a field where the user enters the number of the column to sort on.

Peter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 31, 2017 Oct 31, 2017

Copy link to clipboard

Copied

Hi Peter, Yes this is a ScriptUI window with a listbox with column titles. Thanks for the suggestion. -Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 26, 2018 Jul 26, 2018

Copy link to clipboard

Copied

Hi Rick,

I have the same problem now  - I like to sort a multi column listbox and I found your question. Did you find a solution or do you have any ideas or tipps?

ThanksKlaus

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 26, 2018 Jul 26, 2018

Copy link to clipboard

Copied

LATEST

Hi Klaus,

No, I didn't pursue it any further. I am sorry about that.

Rick

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines