set uitable property everytime?

1 view (last 30 days)
pipin
pipin on 5 Aug 2023
Answered: Rik on 5 Aug 2023
Do I have to set uitable properties everytime I call function?(ColumnWidth...ColumnName)..
function HistoricalTabButtonDown(app, event)
app.DateSearchDropDown_3.Items=string(app.Eq.MinCap_posSiz.DateRicalcolo(end));
app.UITable_Historical_3.Data=Table_Historical_Struct(app.Eq,app.Sis,app.DateSearchDropDown_3.Value);
app.UITable_Historical_3.ColumnWidth= {30,300,50,50,50};
app.UITable_Historical_3.ColumnName = {"#","A","B","C","D"};
end
function DateSearchDropDown_3Clicked(app, event)
item = event.InteractionInformation.Item;
if ~isempty(item)
app.UITable_Historical_3.Data=Table_Historical_Struct(app.Eq,app.Sis,app.DateSearchDropDown_3.Value);
app.UITable_Historical_3.ColumnWidth= {30,300,50,50,50};
app.UITable_Historical_3.ColumnName = {"#","A","B","C","D"};
end
end

Accepted Answer

Rik
Rik on 5 Aug 2023
You only need to set properties if you want to change them, or if you want to ensure they have a specific value.
This is true for all normal Matlab objects with properties.

More Answers (0)

Categories

Find more on Startup and Shutdown 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!