Creating a Input dlg with the current Format type, with variable number of entries
Show older comments
Hi, I want to be able to create an iput dlg box which will allow me to change the format of a uitable.
The number of cols in the table isn't constant.
Here is my code:
data=T.Data;
[rows,cols]=size(data);
ReportMessage(app,['UITABLE cols: ',num2str(cols)]);
dlgtitle = 'Modify Columns Format....';
prompts=compose('Col %d',1:cols);
dims = [1 25];
% Get current column format
clfmt=T.ColumnFormat
if isempty(clfmt)
clfmt=compose('bank',1:cols)
end
%T.ColumnFormat = {'bank','bank','bank','bank'};
definput = clfmt;
y=inputdlg(prompts,dlgtitle,dims,definput);
T.ColumnFormat=y';
I think its the clmt lines, I want to place in the input dlg the current values
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!