-
September 9th, 2013, 12:35 PM
#1
Outlining Items in Visual C++
I am struggling with how to efficiently design my class objects to support the outlining of a collection of items. The collection would be sorted but would also have the ability to indent and outdent individual items representing a Parent and Child relationship (see attached).
An item could indent up to 5 levels deep. A summary level would be considered a Parent while items below the summary level would be consider as children. Working examples would be wonderful, or just an outline of the class design to get me going would be much appreciated.
-
September 9th, 2013, 01:59 PM
#2
Re: Outlining Items in Visual C++
Looks pretty close to a tree control. Are you looking for help with the graphical representation or the actual structure of your data?
-
September 9th, 2013, 02:20 PM
#3
Re: Outlining Items in Visual C++
Thanks for your prompt reply. Not 100% sure, but I believe I need help on the structure of the data, as well as, the design of the classes that will support such a structure. Assuming the list provided started at Level 0 the user would have the ability to indent/outdent individual items given the shown results. Thanks for your patience. Does that help?
-
September 9th, 2013, 02:33 PM
#4
Re: Outlining Items in Visual C++
Originally Posted by aww91
Thanks for your prompt reply. Not 100% sure, but I believe I need help on the structure of the data, as well as, the design of the classes that will support such a structure. Assuming the list provided started at Level 0 the user would have the ability to indent/outdent individual items given the shown results. Thanks for your patience. Does that help?
Flip your design 90 degrees clockwise and connect those 3 upper nodes (Non-Fiction, Fiction, Poetry) to a single root node. Do you see the tree?
http://www.brpreiss.com/books/opus5/html/page257.html
Regards,
Paul McKenzie
-
September 9th, 2013, 02:42 PM
#5
Re: Outlining Items in Visual C++
Good one. Think I got it from here. Thanks
-
September 9th, 2013, 02:49 PM
#6
Re: Outlining Items in Visual C++
Originally Posted by aww91
Good one. Think I got it from here. Thanks
Good. The link discusses a lot of mathematical aspects of trees, but I think it isn't important for what you're trying to accomplish, at least at the moment.
Basically you want to design a tree that is 5 (or 6) levels deep, with n nodes per leaf (the extra level is the root node). You need to know how to insert, remove, and search for an item in the tree. Sounds no different than the usual college CS assignment (is this a school assignment?).
Regards,
Paul McKenzie
-
September 9th, 2013, 02:54 PM
#7
Re: Outlining Items in Visual C++
Nope, just doing some stuff on my own.
Best Regards,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|