Autor Beitrag
ralfi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Mi 23.06.04 14:29 
Hallo!

Wie kann ich ein ListBox-Item mit dem klick der rechten Maustaste markieren?

Danke!
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Mi 23.06.04 14:44 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.ListBoxMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
if Button=mbRight then (Sender as TListbox).ItemIndex:=
 (Sender as TListbox).ItemAtPos(Point(x,y),False);
end;

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
ralfi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Mi 23.06.04 18:21 
Danke sehr! :lol: