www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgprec/generateEditorPages.m
function hInfo = generateEditorPages(obj, hPageGroup) %#ok<INUSL> %GENERATEEDITORPAGES Generate a set of dialog pages for precision editing % % HINFO = GENERATEEDITORPAGES(OBJ, HPAGEGROUP) returns an array of % DialogPageInfo objects that describe a set a of panels for editing the % precision object. % Copyright 2006-2015 The MathWorks, Inc. hInfo = mbcgui.dialog.PageInfo( ... 'PageGroup', hPageGroup, ... 'Name', 'Base Editor', ... 'PreferredWidth', 400, ... 'PreferredHeight', 350, ... 'HelpHandler', 'cghelptool', ... 'HelpCode', 'CGTABLEPROPSPRECISION', ... 'CreateCallback', @i_createlyt); function i_createlyt(hInfo, ~) hParent = hInfo.Parent; msg = 'Precision base-class objects are not editable.'; txt = xreguicontrol(... 'Parent', hParent,... 'HitTest', 'off',... 'Enable', 'inactive',... 'Style', 'text',... 'String', msg,... 'HorizontalAlignment', 'center'); lyt = xreggridbaglayout(hParent, ... 'dimension', [2 1],... 'rowsizes', [-1 -1],... 'rowratios', [1 2],... 'elements',{ [], txt } ); hInfo.setUI(lyt);