View previous topic :: View next topic |
Author |
Message |
tyro
Joined: 04 Dec 2004 Posts: 13
|
Posted: Sun Apr 29, 2007 4:03 am Post subject: sorting and searching listview control |
|
|
How would one go about sorting a populated listview control based on the column clicked and selecting a particular row based on the value typed in a textbox?
Thanks in advance.
Tyro |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Mon Apr 30, 2007 11:13 pm Post subject: Re: sorting and searching listview control |
|
|
I don't think the sorting you want is implemented yet, but I'll give it priority since it should be there. I'll reply here again when it's ready.
For selecting a row, you can scan through its items and then set one of the item's selected property to true. You may need to deselect others. Maybe something like the following: Code: | foreach(item; mylistview.items)
{
item.selected = std.string.icmp(findtext, item.text) == 0;
} |
|
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sun May 06, 2007 8:13 am Post subject: Re: sorting and searching listview control |
|
|
Ok, I implemented advanced ListView sorting in the current DFL snapshot. There's also example listviewdirsort.d showing how it's used.
- Chris |
|
Back to top |
|
|
|