changeguicolors.m

来自「Matlab实现的一个简单的RADAR预警雷达模拟」· M 代码 · 共 24 行

M
24
字号
function changeGuiColors( handles )
    
obj = fieldnames(handles);
for n = 1 : length(obj)
   h = handles.(obj{n});
   if ~isempty(h)
    flipColor( h );
   end
end

function flipColor( h )
    if isprop( h,'children')
        children = get( h,'children' );
        for n =1: length(children)
            flipColor( children(n) );
        end
    end
    for n=1:numel(h)
        if isprop( h(n), 'color' )
            c = get( h(n),'color' );
            c = 1 - c;
            set( h(n),'color',c );
        end
    end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?