Reputation: 2763
I have a need to have a user be able to input a matrix. The size will change depending on the users need, but it will be a rectangle, that is symmetrical (Is that the right term?) 6x4 ,10x2,8x8 (All rows will be the same length in a single matrix).
(Its actually not for any matrix "math" manipulation).
I could use multiline text control delimited but I would prefer a grid.
I could use the gridview but it seems to be difficult to use in this manner. I would prefer to make moving around in the grid very easy.
The user will be able to edit the matrix during the processing.
The one thing that makes this difficult is that the user needs to be able to select and delete (or fill (different function)) a rectangle within the matrix. So point at one cell and then drag pointer to highlight a subset of cells.
To clarify a little I used this extraxt from the Emacs user manual
Rectangle commands operate on rectangular areas of the text: all the characters between a certain pair of columns, in a certain range of lines. Emacs has commands to kill rectangles, yank killed rectangles, clear them out, fill them with blanks or text, or delete them. Rectangle commands are useful with text in multicolumn formats, and for changing text into or out of such formats.
Upvotes: 1
Views: 896
Reputation: 14059
I believe you should use the DataGridView
control. It suits your requirements best way, imho. Recreate its functionality is much harder than to overcome difficulties with data binding.
Upvotes: 2
Reputation: 4892
In WinForm TableLayoutPanel control is what you need for this: TableLayoutPanel
Upvotes: 1