mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2007
Posts: 234
M
MTec007 Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Feb 2007
Posts: 234
I am trying to figure out how to sort the listview by column headers, where it will list a-z,0-999+ when clicked but when clicked twice, it will list z-a,999+-0. I have several headers which i am trying to add this support for, and I'm not sure where to start, I have never attempted this before. all help is great. thanks.

Joined: Feb 2007
Posts: 234
M
MTec007 Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Feb 2007
Posts: 234
does any body know how to do this?

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I feel like if it was a supported feature of MDX it would be documented in MDX's documentation. Have you checked for it?


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
MDX does send a "headerclick" event.
By checking the "headerevent" page you can get the column number that was clicked on
Quote:

headerevent <col#>

Indicates the column most recently affected by an event triggered by the user.


which you can get by querying item 1 in the listviews did.

if you mirror the listviews content in a hidden @window you could then use /filter to sort based on the clicked column taking advantage of /filter's column sorting. Then issue a savebuf/loadbuf to the listview based on the window or even a filter directly. I know for sure loadbuf works with MDX not sure about /filter.


$maybe
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Yeah the issue you are having is thinking that it has all the commands you need when in reality you have to actually write them.

There are a few ways to alphabetize a list. I thought you could use the "sort" parameter for the listbox in the dialog event. If you want to switch back and forth you will have to take note when they click on the header as MPDreamz told you, then sort the list how you want it.

You would also need to provide the graphic if you want to have that arrow point up or down on the header like in MS applications. Then again, I dont think y ou can put an image on the header. If you can't, you can create your own sort button.


Link Copied to Clipboard