www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@mmTableSelectionView/mmTableSelectionView.m
function obj = mmTableSelectionView(varargin) %MMTABLESELECTIONVIEW Constructor for mmTableSelectionView objects % % OBJ = MMTABLESELECTIONVIEW(PROP, VAL, ...) constructs a new % mmTableSelectionView with the given property values. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin && isa(varargin{1}, 'cgtradeoffgui.mmTableSelectionView') obj = varargin{1}; varargin(1) = []; else obj = cgtradeoffgui.mmTableSelectionView; end % Call the inherited constructor obj.View(varargin{:}); % Make controls SC = xregGui.SystemColorsDbl; obj.hList = uicontrol('Parent', obj.Parent, ... 'Visible', obj.Visible, ... 'Position', obj.Position, ... 'Style', 'Listbox', ... 'Min', 0, 'Max', 2, ... 'BackgroundColor', SC.WINDOW_BG, ... 'Callback', {@i_editselection, obj}); % Hook up to the message service if it exists if ~isempty(obj.MessageService) obj.pPostSetMessageService; end function i_editselection(src, evt, obj) sel = get(src, 'Value'); obj.disableMessageServiceListeners; obj.MessageService.setTablesToMake(sel); obj.enableMessageServiceListeners;