问题是:
我需要点击一个Pushbottom时,会选择下一行,相关代码是:
function pushbutton11_Callback(hObject, eventdata, handles)
global mtable;
jScroll = findjobj(mtable);
jtable=jScroll.getViewport.getView;
row = jtable.getSelectedRow ;
jtable.setRowSelectionInterval(row+1,row+1);
jtable.setColumnSelectionInterval(0,99); %the number of mtable columns is 100
在openningFunction
我mtable
如下:
mtable = uitable('parent',gcf,'Units','normalized','Data',data);
set(mtable,'columnName',cname);
set(mtable,'Position',[0.17 0.2 0.75 0.75]);