Reputation: 3391
Okey, so I'm working on a pathfinding program, where I would test various pathfinding algorithms. For this I prefer use a grid control, whereat I can interract with each square, marking them as an obstacle, or a valid path. Here is a picture to demonstrate :
As far as I know, there is no built in control like this in C# WinForms. The only possible solution that came into my mind is using a picturebox, and divide that into squares, but that would not be what I want. So what would you use here to build this?
Upvotes: 1
Views: 369
Reputation: 6750
Well, you could set up a square of panels, then assign each one into a two dimensional array (the array holds a pointer or reference to a panel). therefore creating a xy style grid to test your path finding algorithm on, when the algorithm goes on a certain panel, just change it's color.
Upvotes: 1