Mercurial > hg > ltpda
view m-toolbox/m/gui/gltpda/g_ExpandEdit.m @ 52:daf4eab1a51e database-connection-manager tip
Fix. Default password should be [] not an empty string
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:29:47 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
function g_ExpandEdit(hObject,varargin) % Callback function: run when the user click on the checkbox associated % to each parameter, to enable its setting. global params guiFontSize origEditField = get(hObject,'UserData'); currParamIndex = get(origEditField,'UserData'); paramkey = params.params(currParamIndex).key; if numel(paramkey)>6 && strcmpi(paramkey(1:7),'addpar_'), paramkey(1:7)=[]; end paramval = get(origEditField,'String'); editFigPos = [200,200,800,300]; editFigure = figure('Name',paramkey,'Tag','expandedEditField','MenuBar','none','Toolbar','none','NumberTitle','off','Units','pixels','Position',editFigPos,'Resize','on','ResizeFcn','refresh(gcf)','Color', get(0, 'defaultuicontrolbackgroundcolor')); % Edit field title: uicontrol('Parent',editFigure,'HorizontalAlignment','left','Position',[5 editFigPos(4)-30 editFigPos(3)-10 20],'String','Use this box to type in the value of the selected parameter:','FontName','Times New Roman','FontSize',9,'FontWeight','normal','Visible','on','Style','text'); % Edit field: editField = uicontrol('Parent',editFigure,'String',paramval,'UserData',currParamIndex,'Units','pixels','HorizontalAlignment','left','Position',[5 30 editFigPos(3)-7 editFigPos(4)-60],'FontSize',guiFontSize+1,'Visible','on','max',100,'Style','edit'); % Ok button: uicontrol('UserData',[editField,origEditField],'TooltipString','Apply this setting','String','Set','Parent',editFigure,'BackgroundColor',[0.7 0.7 0.7],'HorizontalAlignment','center','Position',[editFigPos(3)-150 5 70 20],'Visible','on','Callback',@g_editValueCallback,'Style','pushbutton'); % Cancel button: uicontrol('TooltipString','Close this window','String','Close','Parent',editFigure,'BackgroundColor',[0.7 0.7 0.7],'HorizontalAlignment','center','Position',[editFigPos(3)-75 5 70 20],'Visible','on','Callback','closereq','Style','pushbutton'); end