www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@comparisonpane/createComboController.m
function hComp = createComboController(obj, varargin) %CREATECOMBOCONTROLLER Create a combo-box for controlling the plot-type % % CREATECOMBOCONTROLLER(OBJ) creates a combobox that will display % the available plot types correctly and feed changes back into the % comparison pane. A handle to the combobox is returned. % % CREATECOMBOCONTROLLER(OB, PROP, VALUE, ...) passes on the extra property % /value pairs to the control at creation. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. colors = xregGui.SystemColorsDbl; hComp = uicontrol('Parent', obj.Parent, ... 'Visible', obj.visible, ... 'Style', 'popupmenu', ... 'BackgroundColor', colors.WINDOW_BG, ... 'String', obj.pGetOptionStrings, ... 'Value', obj.PlotType, ... 'Callback', {@i_changeplottype, obj}, ... varargin{:}); obj.PlotTypeControllers = [obj.PlotTypeControllers; {hComp}]; function i_changeplottype(src, evt, obj) obj.PlotType = get(src, 'Value');