Index: /trunk/src/civ.m
===================================================================
--- /trunk/src/civ.m	(revision 243)
+++ /trunk/src/civ.m	(revision 244)
@@ -2122,4 +2122,5 @@
             disp(cmd_str);
         else       %run PIVlab if selected
+            drawnow
             if box_test(1)==1
                 Param.Civ1=par_civ1;
Index: /trunk/src/mouse_down.m
===================================================================
--- /trunk/src/mouse_down.m	(revision 243)
+++ /trunk/src/mouse_down.m	(revision 244)
@@ -36,4 +36,7 @@
     hcurrentfig=hObject;%usual plot
 end
+    set(hcurrentfig,'Units','pixels')
+    currentfig_pos=get(hcurrentfig,'Position');%position of the GUI series (in pixels)
+    set(hcurrentfig,'Units','normalized')
 hhcurrentfig=guidata(hcurrentfig);
 test_zoom=get(hhcurrentfig.zoom,'Value');%test for zoom action, first priority
@@ -111,5 +114,7 @@
             break
         elseif isequal(htype,'uicontrol') && isequal(get(hchild(ichild),'Visible'),'on')
-            msgbox(get(hchild(ichild),'String'),get(hchild(ichild),'Tag'))
+                msg_pos(1:2)=currentfig_pos(1:2)+obj_pos(1:2).*currentfig_pos(3:4);
+                msgbox_uvmat(['uicontrol: ' get(hchild(ichild),'Tag')],'',get(hchild(ichild),'String'),msg_pos)
+            %msgbox(get(hchild(ichild),'String'),get(hchild(ichild),'Tag'))
             break
         end
Index: /trunk/src/msgbox_uvmat.m
===================================================================
--- /trunk/src/msgbox_uvmat.m	(revision 243)
+++ /trunk/src/msgbox_uvmat.m	(revision 244)
@@ -38,9 +38,25 @@
 
 % --- Executes just before msgbox_uvmat is made visible.
-function msgbox_uvmat_OpeningFcn(hObject, eventdata, handles,title,display,default_answer)
+function msgbox_uvmat_OpeningFcn(hObject, eventdata, handles,title,display,default_answer,Position)
 % This function has no output args, see OutputFcn.
 
 % Choose default command line output for msgbox_uvmat
 handles.output = 'Cancel';
+set(handles.figure1,'Units','pixels')
+FigPos=[100 150 500 50];%default position
+if exist('Position','var')
+    FigPos(1)=Position(1);
+    FigPos(2)=Position(2)-FigPos(4);% upper left corner set by input Position
+    set(handles.figure1,'Position',FigPos)
+end
+set(handles.OK,'Units','pixels')
+set(handles.OK,'Position',[100 2 60 30])
+set(handles.OK,'FontSize',15)
+set(handles.No,'Units','pixels')
+set(handles.No,'Position',[200 2 60 30])
+set(handles.No,'FontSize',15)
+set(handles.Cancel,'Units','pixels')
+set(handles.Cancel,'Position',[300 2 60 30])
+set(handles.Cancel,'FontSize',15)
 
 % Update handles structure
@@ -69,6 +85,10 @@
             testCancel=0; %no cancel button
             testinputstring=1;
+        case 'INPUT_TXT'
+            testinputstring=1;
         otherwise
-            testinputstring=1;
+          %  testinputstring=1;
+            icontype='';
+            testinputstring=exist('default_answer','var');
     end
 end
@@ -76,29 +96,57 @@
     set(handles.text1, 'String', display);
 end
+% if testinputstring
+%     set(handles.edit_box, 'Visible', 'on');
+% else
+%     set(handles.text1, 'Position', [0.15 0.3 0.85 0.7]);
+% end
 if testinputstring
+    % set(handles.figure1,'Position',[40,80,20*length(default_answer),50])
     set(handles.edit_box, 'Visible', 'on');
+    if ~exist('default_answer','var');
+        default_answer='';
+    end
+    set(handles.edit_box, 'String', default_answer);
+    if exist('Position','var')
+    if iscell(default_answer)
+        widthstring=max(cellfun('length',default_answer));
+        heightstring=size(default_answer,1);
+        set(handles.edit_box,'Max',2);
+    else
+        widthstring=length(default_answer);
+        heightstring=1;
+    end
+    widthstring=max(widthstring,length(title));
+    boxsize=[10*widthstring 20*heightstring];%size of the display edit box 
+    set(handles.edit_box,'Units','pixels')
+    set(handles.edit_box,'FontUnits','pixels')
+    set(handles.edit_box,'FontSize',12)  
+   set(handles.edit_box,'Position',[5,34,boxsize(1),boxsize(2)])
+   FigPos(3)=10+boxsize(1);
+   FigPos(4)=36+boxsize(2);
+   FigPos(2)=Position(2)-FigPos(4)-25;
+   set(handles.figure1,'Position',FigPos)
+    end
+%     set(handles.figure1,'Position',[40,40,20*length(default_answer),50])
 else
     set(handles.text1, 'Position', [0.15 0.3 0.85 0.7]);
 end
-if exist('default_answer','var') &&  testinputstring
-    set(handles.edit_box, 'String', default_answer);
-end
 % Determine the position of the dialog - centered on the screen
-FigPos=get(0,'DefaultFigurePosition');
-OldUnits = get(hObject, 'Units');
-set(hObject, 'Units', 'pixels');
-OldPos = get(hObject,'Position');
-FigWidth = OldPos(3);
-FigHeight = OldPos(4);
-ScreenUnits=get(0,'Units');
-set(0,'Units','pixels');
-ScreenSize=get(0,'ScreenSize');
-set(0,'Units',ScreenUnits);
-
-FigPos(1)=1/2*(ScreenSize(3)-FigWidth);
-FigPos(2)=2/3*(ScreenSize(4)-FigHeight);
-FigPos(3:4)=[FigWidth FigHeight];
-set(hObject, 'Position', FigPos);
-set(hObject, 'Units', OldUnits);
+% FigPos=get(0,'DefaultFigurePosition');
+% OldUnits = get(hObject, 'Units');
+% set(hObject, 'Units', 'pixels');
+% OldPos = get(hObject,'Position');
+% FigWidth = OldPos(3);
+% FigHeight = OldPos(4);
+% ScreenUnits=get(0,'Units');
+% set(0,'Units','pixels');
+% ScreenSize=get(0,'ScreenSize');
+% set(0,'Units',ScreenUnits);
+% 
+% FigPos(1)=1/2*(ScreenSize(3)-FigWidth);
+% FigPos(2)=2/3*(ScreenSize(4)-FigHeight);
+% FigPos(3:4)=[FigWidth FigHeight];
+% set(hObject, 'Position', FigPos);
+% set(hObject, 'Units', OldUnits);
 
 % Show a question icon from dialogicons.mat - variables questIconData and questIconMap
Index: /trunk/src/pivlab.m
===================================================================
--- /trunk/src/pivlab.m	(revision 243)
+++ /trunk/src/pivlab.m	(revision 244)
@@ -91,5 +91,5 @@
         %Find the correlation max, at 255
         [y,x] = find(result_conv==255,1);
-        if ~isnan(y) && ~isnan(x)
+        if ~isempty(y) && ~isempty(x)
             try
                 if subpixfinder==1
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 243)
+++ /trunk/src/series.m	(revision 244)
@@ -62,5 +62,8 @@
 %default initial parameters
 drawnow
-
+set(hObject,'Units','pixels')
+% set(0,'Units','pixels')
+% screensize=get(0,'ScreenSize'); %screen size in pixels
+set(hObject,'Position',[150 100 1000 600] );%position and size in pixels (get adjusted to the screen size in case of excess)
 %load the list of previously browsed files in menus Open and Open_1
 dir_perso=prefdir;
@@ -1672,11 +1675,13 @@
 end
 eval(['h_function=@' ACTION ';']);
-[fid,errormsg] =fopen([ACTION '.m']);
-InputText=textscan(fid,'%s',1,'delimiter','\n');
-fclose(fid)
+try
+    [fid,errormsg] =fopen([ACTION '.m']);
+    InputText=textscan(fid,'%s',1,'delimiter','\n');
+    fclose(fid)
+    set(handles.ACTION,'ToolTipString',InputText{1}{1})
+end
 if ~isequal(path_series,PathName)
     rmpath(PathName)
 end
-set(handles.ACTION,'ToolTipString',InputText{1}{1})
 varargout=h_function();
 Param_list={};
@@ -1854,13 +1859,26 @@
 
 %-----------------------------
-function mouse_up_gui(ggg,eventdata,handles)
-if isequal(get(ggg,'SelectionType'),'alt') 
-    display('global CurData, UserData of GUI series')
-    global CurData
-    CurData=get(ggg,'UserData');
-    evalin('base','global CurData');%make CurData global in the workspace
-    evalin('base','CurData'); %display CurData in the workspace
-    commandwindow
-   % plot_text(CurData)
+function mouse_up_gui(hObject,eventdata,handles)
+if isequal(get(hObject,'SelectionType'),'alt')
+    set(hObject,'Units','pixels')
+    series_pos=get(hObject,'Position');%position of the GUI series (in pixels)
+    set(hObject,'Units','normalized')
+    xy_fig=get(hObject,'CurrentPoint');% current point of the current figure (gcbo)
+    hchild=get(hObject,'Children');%handles of all objects in the current figure
+    %% loop on all the objects in the current figure (selected by the last mouse click)
+
+    for ichild=1:length(hchild)
+        obj_pos=get(hchild(ichild),'Position');%position of the object        
+        if numel(obj_pos)>=4 && xy_fig(1) >=obj_pos(1) && xy_fig(2) >= obj_pos(2)&& xy_fig(1) <=obj_pos(1)+obj_pos(3) && xy_fig(2) <= obj_pos(2)+obj_pos(4);         
+            htype=get(hchild(ichild),'Type');%type of object child of the current figure
+            %if the mouse is over an axis, look at the data
+            if isequal(htype,'uicontrol') && isequal(get(hchild(ichild),'Visible'),'on')
+                msg_pos(1:2)=series_pos(1:2)+obj_pos(1:2).*series_pos(3:4);
+                msgbox_uvmat(['uicontrol: ' get(hchild(ichild),'Tag')],'',get(hchild(ichild),'String'),msg_pos)
+                break
+            end
+        end
+    end
+    set(hObject,'Units','pixels')
 end
 
@@ -2196,5 +2214,5 @@
 if isequal(mode,'#_ab')
     dirpair=dir([filebasesub '*_*.nc']);
-elseif isequal(mode,'bursts')|isequal(mode,'series(Dj)')  
+elseif isequal(mode,'bursts')||isequal(mode,'series(Dj)')  
     dirpair=dir([filebasesub '_*_*-*.nc']);
 elseif isequal(mode,'series(Di)')
