-
Notifications
You must be signed in to change notification settings - Fork 76
/
PTdispSetupInfoUIcontrol.m
49 lines (39 loc) · 2 KB
/
PTdispSetupInfoUIcontrol.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
%% PTdispSetupInfo
% ----------------------------------------------------------------------------------
% "THE BEER-WARE LICENSE" (Revision 42):
% <[email protected]> wrote this file. As long as you retain this notice you
% can do whatever you want with this stuff. If we meet some day, and you think
% this stuff is worth it, you can buy me a beer in return. -Brian White
% ----------------------------------------------------------------------------------
if ~isempty(fnameMaster)
PTdisp=figure(5);
screensz = get(0,'ScreenSize');
set(PTdisp, 'units','normalized','outerposition',[.1 .1 .75 .8])
PTdisp.NumberTitle='on';
PTdisp.Name= ['PIDtoolbox (' PtbVersion ') - Setup Info'];
set(PTdisp,'color',bgcolor)
columnWidth=55*round(screensz_multiplier*prop_max_screen);
TooltipString_FileNumDispA=['List of files available. Click to view setup info for each'];
posInfo.FileNumDispA=[.22 .95 .1 .04];
posInfo.FileNumDispB=[.72 .95 .1 .04];
posInfo.checkboxDIFF=[.04 .96 .1 .04];
guiHandlesInfo.FileNumDispA = uicontrol(PTdisp,'Style','popupmenu','string',[fnameMaster],...
'fontsize',fontsz, 'units','normalized','outerposition', [posInfo.FileNumDispA],'callback','@selection; PTdispSetupInfo;');
guiHandlesInfo.FileNumDispA.Value=1;
if Nfiles > 1
guiHandlesInfo.FileNumDispB = uicontrol(PTdisp,'Style','popupmenu','string',[fnameMaster],...
'fontsize',fontsz, 'units','normalized','outerposition', [posInfo.FileNumDispB],'callback','@selection; PTdispSetupInfo;');
guiHandlesInfo.FileNumDispB.Value=2;
end
guiHandlesInfo.checkboxDIFF =uicontrol(PTdisp,'Style','checkbox','String','Show Differences Only','fontsize',fontsz,'TooltipString', [''],...
'units','normalized','BackgroundColor',bgcolor,'outerposition',[posInfo.checkboxDIFF],'callback', 'PTdispSetupInfo;');
else
warndlg('Please select file(s)');
end
% functions
function selection(src,event)
val = c.Value;
str = c.String;
str{val};
% disp(['Selection: ' str{val}]);
end