Can I make a Pushbutton create a new Table?
2 ビュー (過去 30 日間)
古いコメントを表示
What I'm trying to do is: When I press a Pushbutton - a Table will be created on the Panel. Is it possible?
0 件のコメント
採用された回答
Image Analyst
2013 年 2 月 11 日
Why not just have the table there already in the panel? You can make it visible or not by doing
set(handles.panel1, 'visible', 'on');
You can send data to the table by doing
set(handles.table1, 'Data', yourDataArray);
3 件のコメント
Image Analyst
2020 年 7 月 8 日
Not sure what else to say. It takes your data, for example a double array or cell array called yourDataArray, and puts it into the table (spreadsheet) on the GUI so that the table now appears with the current values that are in your array. Basically what I said "send data to the table".
By the way, the new OOP way of doing it is:
handles.panel1.Visible = 'on'; % Make sure table is visible (not hidden/invisible).
handles.table1.Data = yourDataArray; % Send current values in variable yourDataArray to the table on the GUI.
Chris Dan
2020 年 7 月 8 日
Okay, thanks. I understood it
Can you please help me with this question
その他の回答 (2 件)
Jan
2013 年 2 月 11 日
編集済み: Jan
2013 年 2 月 11 日
Yes.
What have you tried so far and did any problems occur? You can either create the table dynamically by calling the uitable command, of you can create the table statically e.g. in GUIDE and make it invisible at first, such that the callback of the button set the visibility to 'on' only.
2 件のコメント
Jan
2013 年 2 月 11 日
Simply insert the command uitable there and look what happens. You find many examples in the net, when you search for "Matlab uitable".
Nimrodb
2013 年 2 月 11 日
1 件のコメント
Image Analyst
2013 年 2 月 11 日
Try what? Whose answer were you commenting on? This is why it's good to reply to a specific person's answer rather than posting your follow up question as an Answer in itself.
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!