www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@labelcontrol/doSetupL.m
function doSetupL(h) %DOSETUPL Create property listeners for object % % DOSETUPL(OBJ) creates listeners that link property changes to on-screen % object updates. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. fcns = h.cbfcn_cache; h.List = [handle.listener(h,'ObjectBeingDestroyed',fcns{1});... handle.listener(h,h.findprop('BackgroundColor'),'PropertyPostSet',fcns{2});... handle.listener(h,h.findprop('ForegroundColor'),'PropertyPostSet',fcns{2});... handle.listener(h,h.findprop('Control'),'PropertyPostSet',fcns{3});... handle.listener(h,h.findprop('Enable'),'PropertyPostSet',fcns{5});... handle.listener(h,h.findprop('String'),'PropertyPostSet',fcns{2});... handle.listener(h,h.findprop('Position'),'PropertyPostSet',fcns{6});... handle.listener(h,h.findprop('Visible'),'PropertyPostSet',fcns{4});... handle.listener(h,h.findprop('Parent'),'PropertyPostSet',fcns{11});... handle.listener(h,h.findprop('Gap'),'PropertyPostSet',fcns{6});... handle.listener(h,h.findprop('LabelSize'),'PropertyPostSet',fcns{6});... handle.listener(h,h.findprop('LabelSizeMode'),'PropertyPostSet',fcns{6});... handle.listener(h,h.findprop('LabelAlignment'),'PropertyPostSet',{fcns{10}, h.LabelH, 'horizontalalignment'});... handle.listener(h,h.findprop('ControlSize'),'PropertyPostSet',fcns{6});... handle.listener(h,h.findprop('ControlSizeMode'),'PropertyPostSet',fcns{6});... handle.listener(h,h.findprop('GrayDisable'),'PropertyPostSet',fcns{7});... handle.listener(h,h.findprop('Border'),'PropertyPostSet',fcns{6});... handle.listener(h,h.findprop('FontWeight'),'PropertyPostSet',{fcns{10}, h.LabelH, 'FontWeight'});... handle.listener(h,h.findprop('FontSize'),'PropertyPostSet',{fcns{10}, h.LabelH, 'FontSize'});... ]; h.BaselineList = [handle.listener(h,h.findprop('BaselineOffsetMode'),'PropertyPostSet',fcns(8));... handle.listener(h,h.findprop('BaselineOffset'),'PropertyPostSet',fcns(9));... handle.listener(h,h.findprop('BaselineOffsetZero'),'PropertyPostSet',fcns(9));... ]; set(h.List,'CallbackTarget',h); set(h.BaselineList,'CallbackTarget',h);