problem clicking uitable checkbox

3 views (last 30 days)
Vincent I
Vincent I on 15 Jul 2013
My goal is to have a button go from off to on, or viceversa, when a checkbox is selected in the table. However for some reason sometimes works sometimes doesnt. From what I can tell for some reason when I click on a checkbox the callback function runs twice so although the check box might be checked or unchecked the button might be on or off. Any ideas?
function inputTable_Callback(hObject, eventdata, handles)
data_table = get(handles.Data_Table,'Data');
if ~isempty(find([data_table{:,3}]==1))
set(handles.RunScenario_Button,'BackgroundColor',[0.941176 0.941176 0.941176])

Answers (1)

Vincent I
Vincent I on 15 Jul 2013
found my problem...
the table cell selection and edit accessed the same function
'ColumnEditable',[false false true false false true],...
clearly that's a no no at least in my case....


Find more on Migrate GUIDE Apps 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!