function txt=pairinfo(obj,event_obj,signals,POffsetHist3,bsize,ROI,indx)
pos=get(event_obj,'Position');
x1=pos(1)- bsize/2;
x2=pos(1)+ bsize/2;
pairnames={};
for i=1:length(POffsetHist3)
    pairs=find(POffsetHist3{i}<x2 & POffsetHist3{i}>x1)+(ROI*indx);
    if isempty(pairs)==0
        for h=1:length(pairs)
        pairnames{i}(h)={[signals(pairs(h)).name,'        :   ',signals(i).name]};
        end
    end
end

pairnames1=[{'REFERENCE :   TARGET'},horzcat(pairnames{:})];
txt=[pairnames1(:)];