Question

I'm experimenting with C# using Visual Studio 2010 Beta 2. What I'd like to do is display data in a similar format as Windows Defragmenter does, i.e. in a grid consisting of many small rectangular elements. These elements should be turned off and on depending on data (i.e. having different colours) and customizable in number of elements and displayed size of elements.

Is there such a control built-in, which I could use, or should I make my own (and in the latter case, what approach would you recommend)?

Was it helpful?

Solution

A UserControl containing a PictureBox would likely be a good approach. Drawing a grid is fairly straightforward. If the grid is very large or it updates very frequently, then overriding UserControl's Paint event handler is a second approach.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top