Popupmenu in the uitable

3 Ansichten (letzte 30 Tage)
Eggo Ogge
Eggo Ogge am 4 Mär. 2011
I have a popupmenu in the uitable: set(handles.uitable1, 'ColumnFormat', {{'A' 'R'}) And I want to do, if I choose 'A', than do something, for example, 2+2, else 2-2. How to format function, that it does, what I want?

Akzeptierte Antwort

Oleg Komarov
Oleg Komarov am 4 Mär. 2011
You should use CellEditCallback:
set(handles.uitable1, 'ColumnFormat', {'A' 'R'},'CellEditCallback',@myFun)
function myfun(varargin)
% Check for the value
% Do stuff
end
Oleg
  5 Kommentare
Eggo Ogge
Eggo Ogge am 7 Mär. 2011
It sends me the error.
Maybe it is another structure, I don't need that he shows, what the letter is: 'A' or 'R', but I need, that if it is the letter 'A', will do one action, else, another action.
Oleg Komarov
Oleg Komarov am 9 Mär. 2011
There's is not such a thing as THE ERROR. Post the complete error msg you get.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by