Autor Beitrag
Deathman
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 52

Win XP
Turbo Pascal, Delphi 6, Delphi 2006
BeitragVerfasst: Do 16.08.07 16:49 
Hi Leute!

Ich hab schon gesucht aber irgendwie nichts gefunden. Also ich möchte ein Item aus einer Listbox in ein Stringgrid verschieben. Am besten natürlich mit der Drag'n'Drop fuktion hab aber echt keine Peilung wie dat geht.

THX im Vorraus.

Mfg Deathman
Deathman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 52

Win XP
Turbo Pascal, Delphi 6, Delphi 2006
BeitragVerfasst: Do 16.08.07 17:07 
so hab es jetzt doch endlich durch eine eingebung hinbekommen.
Problem ist jetzt ich kann jetzt kein Feld im Stringgrid mehr markieren. weil er den Focus dann immer auf die Listbox setzt. Weiß einer wie ich das jetzt wegbekomme.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TNotdienst.StringGrid1DragDrop(Sender, Source: TObject; X,
  Y: Integer);
var Temp: TListbox;
begin
  Temp:= (Source as TListbox);
  Stringgrid1.Cells[Stringgrid1.MouseCoord(x,y).X,Stringgrid1.MouseCoord(x,y).Y]:=Temp.Items[Temp.ItemIndex];
end;

procedure TNotdienst.StringGrid1DragOver(Sender, Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
  Accept := Source = ListBox1;
end;
Deathman Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 52

Win XP
Turbo Pascal, Delphi 6, Delphi 2006
BeitragVerfasst: Mi 05.09.07 18:14 
Hi Leute ich weiß nicht ob ich irgendetwas falsch mache aber wenn ja dann sagt es mir bitte. aber es wäre echt wichtig dass mir jemand hilft.