uitable tooltip for long entries
34 ビュー (過去 30 日間)
古いコメントを表示
Hello guys,
In uitable component, when there is not enough room for text to display, tooltip will be displayed with the full text. When the content of a cell is an numeric or cell array, it will show i.e. 1x4 cell. Is it possible to modify the tooltip functionality to display the content of these cells in a textual way such as below?
{'3', '2', 'text', 1}
Is there some callback that I haven't seen?
Some background can be found in this question https://uk.mathworks.com/matlabcentral/answers/499210-app-designer-tooltip-for-long-cell-content-in-uitable-is-covered-by-other-objects.
Thanks.
2 件のコメント
回答 (1 件)
Jacob Mathew
2025 年 6 月 30 日 7:07
編集済み: Jacob Mathew
約15時間 前
While this is not a direct solution on how to update the UI Tool Tip, there is a workaround where you can convert the cell array into string and print that instead. This allows the default UI Tool Tip behaviour to function as expected and display the whole content if there is overflow. You convert the cell array contents into string using the code below:
app.UITable.Data={'sample'};
myCellArray = {'1','2','text',4};
cellStr = char(formattedDisplayText(myCellArray));
app.UITable.Data(:,2)={cellStr};
The output is as follows when the above code is put into the StartupFcn() of the App:

This matches how the output would look like when you create a cell array and display it in the command line:
myCellArray = {'1','2','text',4}
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!