Можно привязаться к координатам курсора в клиентской области объекта во время щелчка. Допустим, есть шесть панелей в StatusBar'е по 50 px шириной каждая.
Код:
procedure TForm1.StatusBar1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
case X of
0..50: ShowMessage('This is the first panel');
51..100: ShowMessage('This is the second panel');
101..150: ShowMessage('This is the third panel');
151..200: ShowMessage('This is the fourth panel');
201..250: ShowMessage('This is the fifth panel');
else ShowMessage('This is the fixth panel');
end;
end;
Просто замените диапазоны в операторе
case, исходя из ширин (width) ваших панелей.