Re:Tlistview linked to another Tlistview
Quote
In article <3b61d056_1@dnews>, KenK wrote:
> I'd like to learn how to create a parent/child link between two TListViews.
> When a person selects an item from the parent the child will narrow it's
> record displays to only items that belong to that parent. When NO item is
> selected all child records will display. This is not a database program but
> simply a utility to check email from numerous accounts and show the email
> accounts in the parent list and the email headers in the child TViewList.
> Based on what I've been reading, I'm going to need to use the addObject() or
> ..data property to do this.... does this sound like I'm on the right track?
Well, you need some way to associate the items to display in the second
listview with entries in the first one. How you do that is completely
dependent on how you store your data. If you have one list object for each
account it would make sense to store the reference to the list object into the
TListitem.Data property of the items in the first listview. You then use a
suitable event to detect when the user selects one item (i.e. oNSelectItem),
retrieve the object reference from the items Data property and hand it to a
routine that fills the second listview.
Peter Below (TeamB) 100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.