www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgexpr/propertydialog.m
function [obj, ok] = propertydialog(obj) %PROPERTYDIALOG Display a properties dialog. % % [OBJ, OK] = PROPERTYDIALOG(OBJ) displays a property dialog for the % expression and blocks until the dialog is closed. This will contain a % number of tabs which may vary according to the expression class. The % tabs may also allow editing of information. The OK flag indicates % whether there were any changes made to the object when the dialog was % open. % Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. % Use capitalized type string for the title tpstr = gettype(obj); NeedToUpper = regexp(tpstr,'\<[a-z]'); tpstr(NeedToUpper) = upper(tpstr(NeedToUpper)); h = mbcgui.dialog.StandardDialog(obj, ... 'DisplaySinglePageAsTab', true,... 'PageInfoFunction', @generatePropertyPages,... 'Title', sprintf('%s Properties', tpstr)); ok = h.show; if ok newobj = h.Object; % Call a method that gives subclasses a chance to perform some % post-closing special actions. obj = finishPropertyDialog(obj, newobj); end delete(h);