SlS
Сообщения: n/a
|
Профиль
| Цитировать
1.
procedure TForm1.ListBox1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button=mbLeft then begin //если левая кнопка мыши
PopupMenu1.Popup(ListBox1.Left+x+left,ListBox1.Top+y+top); //открыть Popup menu в координатах
// можно взять также координаты мыши
end;
end;
2.
Опять же как и в первом. Пункт выделяется сам.
3.
Тут уже делаем либо If, либо Case
procedure TForm1.ListBox1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button=mbLeft then begin //если левая кнопка мыши
if ListBox1.ItemIndex=X then begin
PopupMenuX.Popup(ListBox1.Left+x+left,ListBox1.Top+y+top); //открыть Popup menu X в координатах
end;
end;
|
Отправлено: 19:41, 12-10-2005
| #2
|