问题
I want to place a uicontrol button in each row of a uitable. Does MATLAB have the native functionality for this, or do I need to use Java/HTML?
回答1:
As far as I know, this is not possible using standard MATLAB. You can use the CellSelectionCallback
and CellEditCallback
of the uitable
together with the MouseClickedCallback
of the corresponding uitablepeer
to provide a button-like functionality for standard table cells. See this thread for more infor on the MouseClickedCallback
.
An easier way is probably to use Java tables right from the beginning if your setup allows it.
来源:https://stackoverflow.com/questions/10386673/does-matlab-allow-a-uicontrol-button-to-be-placed-within-a-cell-in-a-uitable