if exist ('OCTAVE_VERSION', 'builtin'); graphics_toolkit('qt'); ver_str = ['octave ' version]; else ver_str = ['matlab ' version]; end h = figure; uicontrol(h, 'Style', 'Pushbutton', 'String', 'enable=off', ... 'Position', [10, 10, 120, 15], 'enable', 'off', ... 'CallBack', @(src,ev) disp('off')); uicontrol(h, 'Style', 'Pushbutton', 'String', 'enable=inactive', ... 'Position', [10, 30, 120, 15], 'enable', 'inactive', ... 'CallBack', @(src,ev) disp('inactive')); uicontrol(h, 'Style', 'Pushbutton', 'String', 'enable=on', ... 'Position', [10, 50, 120, 15], 'enable', 'on', ... 'CallBack', @(src,ev) disp('on')); uicontrol(h, 'Style', 'Text', 'String', ver_str, ... 'Position', [10, 70, 120, 15]);