MATLAB uitable row generation from user input -


I have found a GUI in MATLAB which uses for input. There are a fixed number of columns, and each column has a very specific form that I have stored in a cell array such as:

  columnformat = {'text', 'numeric', {@ DoSomething, inputArg1}, {'Option1' 'Option2'}};   

The number of rows is theoretically unlimited; Users are able to handle many line inputs back-and-arbitrary as they might like. Right now, I am creating a big project initially, and just thinking that the user will not use it all.

Here's the question: I want to set the table and the corresponding code like at any time the user has selected the last line and press enter, this will be a new format with the same table Makes the line.

I have tried many different ways, including dynamically setting the 'data', and they all break the custom formatting defined by cell array. I'm sure someone has done this before, thanks for your help!

I can not think of the possibility of getting a definite key, I think It will be possible with any key ( KeyPressFcn ), but I recommend submitting a toolbar with a pushbutton:

  h = shape (... U = UTIFIC (H, ... SET (U, 'TAG', 'MATTABLE' 'Tbar = uitoolbar (h); Yupusholol (tbar,' clicked Callback ', @ addRow);   

In your callback function you can get your data, Adding the person and typing it back: addRow (~, ~) u = findobj (0, 'type', 'worthy', 'tag', 'myTable'); data = End (u, 'data');% // Modify your data, add a line ... Set (src, 'data', data); end

Sorry If everything is a bit straightforward and attached, but a good answer would require considerable effort, I do not have time. The tag can give you a lot of ideas.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -