FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sorting and searching listview control

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
tyro



Joined: 04 Dec 2004
Posts: 13

PostPosted: Sun Apr 29, 2007 4:03 am    Post subject: sorting and searching listview control Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Apr 30, 2007 11:13 pm    Post subject: Re: sorting and searching listview control Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sun May 06, 2007 8:13 am    Post subject: Re: sorting and searching listview control Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group