Autor Beitrag
qwertzuiopü
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: So 25.02.07 19:02 
Halli Hallo,

ich hätte gerne gewust, ob es eine möglichkeit giebt, Listbox items mit hilfe der maus auf ein panel zu ziehen, so das dann der string des item in panel.caption wandert?
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: So 25.02.07 19:13 
Ja per Drag & Drop

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 25.02.07 19:43 
Mich hat grad mal interessiert, wie das geht. Deshalb hier der Source:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
procedure TForm1.Panel1DragDrop(Sender, Source: TObject; X, Y: Integer);
var
  Temp: TListBox;
begin
  Temp := (Source as TListBox);
  Panel1.Caption := Temp.Items[Temp.ItemIndex];
end;

procedure TForm1.Panel1DragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
  Accept := Source = ListBox1;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ListBox1.DragMode := dmAutomatic;
end;

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
qwertzuiopü Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 63



BeitragVerfasst: Mo 26.02.07 09:42 
cool, danke für die hilfe