How to hide data in a UITable ?
24 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Gwendal Marrec
il 11 Ago 2022
Commentato: Gwendal Marrec
il 11 Ago 2022
Hello,
I am plotting data in a UITable on App Designer.
Here is what my code looks like :
paramD = struct('name',"frequence",'unite',"GHz",'nb',numel(freq),'liste',freq,'scattering',s_list);
app.Table.Data = struct2table(paramD);
app.Table.ColumnName = struct2table(paramD).Properties.VariableNames;
Like so, the table looks like this :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1094180/image.png)
'liste' data could sometimes take up to 500 values.
And I would like the table to be :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1094185/image.png)
without having to create an empty row in the table like this line of code does :
paramD = struct('name',{"frequence",""},'unite',{"GHz",""},'nb',{numel(freq),0},'liste',{freq,0},'scattering',{s_list,0});
Do you know how to hide data so it only appears as '1x154 double' instead of the whole list ?
Thanks in advance,
Gwendal
3 Commenti
Walter Roberson
il 11 Ago 2022
No, not for the built-in classes. If this were for your own class, you could matlab.mixin.CustomDisplay class
Risposta accettata
Kevin Holly
il 11 Ago 2022
You could do this workaround:
paramD = struct('name',"frequence",'unite',"GHz",'nb',numel(freq),'liste',{freq,0},'scattering',s_list);
app.UITable.Data = struct2table(paramD);
app.UITable.Data(2,:)=[];
app.UITable.ColumnName = struct2table(paramD).Properties.VariableNames;
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!