www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@DialogAction/setButtonProperties.m
function setButtonProperties(obj, hButton) %SETBUTTONPROPERTIES Set button properties to match the action % % SETBUTTONPROPERTIES(OBJ, HBUTTON) is called when the uicontrol button's % properties need to be set up to match the action's state. % Copyright 2007 The MathWorks, Inc. and Ford Global Technologies, Inc. lbl = obj.pRemoveMnemonic(obj.Label); enabled = obj.Enabled; if ~isempty( obj.Dialog ) enabled = enabled && obj.Dialog.Enabled; end set(hButton, ... 'Enable', mbconoff(enabled),... 'Visible', mbconoff(obj.Visible), ... 'String', lbl);