表格数据在此位置不可编辑。这不会让我在Matlab中选中复选框

时间:2018-11-01 21:20:52

标签: matlab-figure

btn = uicontrol('Style', 'pushbutton', 'String', 'save',...
            'Position', [330 150 90 40],...
            'Callback', '');

      btn.Callback = @Selection;

        function Selection(src,event)

            h = figure('Visible','on','position',[100 100 1100 600]);

    data = rand(20,5);

    uit = uitable('ColumnWidth',{100 100 100 70 60},'Data',data,...
    'ColumnFormat', {'long','long','char','numeric','logical'},...
    'ColumnEditable', [false false false false true]);


    dbfile = fullfile('C:\Users\toranj\Desktop\CrisisManagement-db\Emergency','Emergency.db'); 
    conn = sqlite(dbfile);
    sqlquery = 'SELECT latitude,Longitude,Name,code FROM EmergencyR';
    extracted_data = fetch(conn, sqlquery);
    uit.ColumnName = {'lat','lan','Name','Code','selection'};
    uit.Data = (extracted_data);
    uit.Position = [350 250 uit.Extent(3) uit.Extent(4)];

    close(conn);

我无法选择复选框。单击它时,出现此错误:警告:表数据在此位置不可编辑。 请帮助我

0 个答案:

没有答案