forked from bw1129/PIDtoolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PTdispSetupInfoUIcontrol.m
46 lines (35 loc) · 2.01 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
%% 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', 'Position', [.1 .1 .75 .8], 'NumberTitle', 'on', 'Name',
['PIDtoolbox (' PtbVersion ') - Setup Info'],'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, 'Value', 1, 'units', 'normalized', 'Position', [posInfo.FileNumDispA], 'callback', '@selection; PTdispSetupInfo;');
if Nfiles > 1
guiHandlesInfo.FileNumDispB = uicontrol(PTdisp, 'Style', 'popupmenu', 'string', [fnameMaster],
'fontsize', fontsz, 'Value', 2, 'units', 'normalized', 'Position', [posInfo.FileNumDispB], 'callback', '@selection; PTdispSetupInfo;');
end
guiHandlesInfo.checkboxDIFF = uicontrol(PTdisp, 'Style', 'checkbox', 'String', 'Show Differences Only', 'fontsize', fontsz, 'TooltipString', [''],
'units', 'normalized', 'BackgroundColor', bgcolor, 'Position', [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