Is there an option to write to a specific cell of a uitable

1 回表示 (過去 30 日間)
Nimrodb
Nimrodb 2013 年 2 月 16 日
コメント済み: Walter Roberson 2018 年 10 月 8 日
I have a gui'd table. I want to change a specific cell in it.
How do I do that? The code I know so set the table data is:
STA1_Data = set(handles.STA1_Table,'Data',A); %(A is a matrix same size of STA1_Table)
Is there a syntax/way that updated only (for ex.) cell (3,7) of the table?

採用された回答

Walter Roberson
Walter Roberson 2013 年 2 月 16 日
There is no supported MATLAB method to update only one particular cell, other than fetching the cell array, updating it, and set() it as the new cell array.
If I recall correctly, there is a Java method of updating single cells the constructs that underlie a uitable.

その他の回答 (1 件)

Jeffery Devereux
Jeffery Devereux 2016 年 11 月 10 日
編集済み: Walter Roberson 2018 年 10 月 8 日
LBT = uitable(SimDat.LBFig,'Position',[5 60 595 450],...
'BackgroundColor',[1 1 1 ;0.85 1 1],...
'ForegroundColor','black',...
'RowName',[],...
'ColumnName',[],...
'Tag','LBTable');
LBT.Data{1,1} = ' Parameters:';
  2 件のコメント
Jayant
Jayant 2018 年 10 月 8 日
thanx sir, gret help.. is there any way to change the color also for individual cell in table..
Walter Roberson
Walter Roberson 2018 年 10 月 8 日
This should work in R2014b or later.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by