www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@labelcontrol/doEnable.m
function doEnable(h) %DOENABLE Set enable property on Label control % % DOENABLE(OBJ; % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. val = h.Enable; if strcmp(val,'on') LabelEnSetting = 'inactive'; else LabelEnSetting = h.enable; end if h.hascontrol set(h.Control, 'Enable', val); if mbcgui.hgclassesutil.isprop(h.Control, 'BackgroundColor') if strcmp(h.GrayDisable,'on') && strcmp(h.Enable,'off') bgc=h.BackgroundColor; else bgc=h.OriginalControlBGColor; end set(h.Control, 'BackgroundColor',bgc); end end set(h.LabelH, 'Enable', LabelEnSetting);