I'd like to write a matrix evaluation tool.(add, multiply, inverse etc.)
So I need some way to manually input the values of a matrix.
I don't want the input to be console like : "Give val for r1,c2" or something like that.
I want a forms app with a table input.
I can think of two options here:
1) A TableLayoutPanel filled with TextBoxes
2) A DataGridView

What should I decide on? Are there other and possibly better alternatives? Any help on this matter is more than welcome.

Either would work, but I guess in the long term it depends more on excactly how you're going to process your matrix - of course the perfect answer would be to device a matrix input component, which consists of either of your ideas, but done so you can drop a Matrix onto your form and size and so on.

Yep, make your own up, that you can then reuse as your "matrix" input, but it would then allow all that class to do the validation etc.

Wether you stem it from textboxes or a datagrid is kinda down to how you want it to work I guess, in the short term textboxes maybe easier to work with though

Yes, if I were you, I'd make it UserControl
1- You have constant control (be used in this App and others)
2- You need this control to give you "a matrix" more than textboxs values, some how you isolate logic from UI and UI controls from UI processing elements.

DataGridView is indeed to database minded. So a UserControl it is. This implies more work I guess? (eventhandling, tabbing, mapping to the matrix class...

yes and no. You can do a dataview to something in memory, such as a list.. I believe even an arraylist.. so.. maybe theres food for thought in that.

The key thing is how your user is going to feel using it. You need to decide which would be easiest to work with to give you what you wanted.

Thanks guys!
I will try to work something out.
If I have problems you will hear again from me.

This question has already been answered. Start a new discussion instead.