📄 alexdlg.m
字号:
function dlgr=alexdlg(dmsg, b1,b2,b3)%ALEXDLG Open a dialog box%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu, mark@alice.uoregon.edu%global Uibgcolor ed sg dlgf dlgr dlgb1 dlgb2 dlgb3 qqqq=0;sg=dmsg;dlgr='Cancel';if isempty(Uibgcolor) Uibgcolor=[.55 .55 .55];endif nargin < 1 error('Too few input arguments.')endif nargin > 4 error('Too many input arguments.')endif nargin==1 b1='Yes';b2='No';b3='Cancel';endif nargin==2 b2='No';b3='Cancel';endif nargin==3 b3='Cancel';endpos=[0 0 0 0];c=screencenter;pos(1)=c(1)-230;pos(2)=c(2)-120;pos(3)=460;pos(4)=240;dlgf=figure('name', 'Dialog',... 'Resize', 'off',... 'NumberTitle', 'off',... 'Position', pos,... 'Color', Uibgcolor);ed=uicontrol('style', 'edit',... 'units', 'normalized',... 'pos', [0.03 0.4 0.94 0.55],... 'min', 1,... 'max', 10,... 'horiz', 'center',... 'string', dmsg,... 'Callback', 'global ed sg;set(ed, ''string'', sg);');uicontrol('style', 'frame',... 'units', 'normalized',... 'pos', [0.03 0.05 0.94 0.28],... 'background', Uibgcolor);dlgb1=uicontrol('style', 'push',... 'units', 'normalized',... 'pos', [0.1 0.1 0.2 0.15],... 'horiz', 'center',... 'string', b1,... 'Callback', 'global qq dlgb1 dlgr;dlgr=get(dlgb1, ''string'');qq=1;');dlgb2=uicontrol('style', 'push',... 'units', 'normalized',... 'pos', [0.4 0.1 0.2 0.15],... 'horiz', 'center',... 'string', b2,... 'Callback', 'global qq dlgb2 dlgr;dlgr=get(dlgb2, ''string'');qq=1;');dlgb3=uicontrol('style', 'push',... 'units', 'normalized',... 'pos', [0.7 0.1 0.2 0.15],... 'horiz', 'center',... 'string', b3,... 'Callback', 'global qq dlgb3 dlgr;dlgr=get(dlgb3, ''string'');qq=1;');while qq==0 if ~figflag('Dialog', 0); return; endendclose(dlgf);return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -