Jump to content
  • Advertisement
Sign in to follow this  
c0uchm0nster

Windows forms noob

This topic is 4025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I'm writing a map editor and I've realized that I know even less about windows forms than I thought I did. MSDN is an alright source, but there are some times when I just don't know what to look up or which option is best. Specifically right now I'm trying to populate a listview (or treeview or some other view) that will list images/objects from a flatfile of some kind (either xml or xls). I've seen how to add an individual item to a listview, but I'm not sure how to do much else (i.e. load in an entire file of data, pass that data to something when it's double-clicked in the view, load the corresponding images in the view). If anyone knows of a good source of info or can just tell me how to do that all I'd be very grateful. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Quote:

I've seen how to add an individual item to a listview

Break your problem down and start from things you know. If you can add one item to a listview, you can add N (use a loop). Obviously having the items you want to add in an array of some sort would be useful. You can acquire an array by reading each element from your file and adding it to an array or List<T> (or if the items are strings, you can use the File.ReadAllLines() function which returns a string[]).

Unfortunately I don't have any other resources to offer you; I've been able to find everything I've needed on MSDN.

Share this post


Link to post
Share on other sites
So then a listview is my best bet? And there's no better way than a flatfile read in with a loop & using custom fields in the listview? and then how do i sync that data with images to display in the listview?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!