Einzelnen Beitrag anzeigen

Blubbel

Registriert seit: 6. Okt 2011
125 Beiträge
 
Delphi 2010 Professional
 
#4

AW: Drag&Drop mit TcxListBox und TcxTreeList

  Alt 4. Jul 2012, 08:33
Soweit so gut. nun bekomme ich in der Zeile darunter eine Fehlermeldung

Zitat:
Im Projekt *.exe ist eine Exception der Klasse EAccessViolation mit der Meldung 'Zugriffsverletzung bei Adresse 0087A5A6 in Modul '*.exe'. Lesen von Adresse 00000000' aufgetreten.
Delphi-Quellcode:
if Assigned(Source) then
  begin
    lSource := string(Source.ClassName);
    if (Source is TcxDragControlObject) and (TcxDragControlObject(Source).Control is TcxListBox) then //hier geändert
    begin
      i := TcxListBox(Source).ItemIndex; //hier bekomme ich eine Fehler meldung

      if (i >= 0) then
      begin
ok, hab im Code jetzt Statt
Delphi-Quellcode:
 lSource := string(Source.ClassName);
    if (Source is TcxDragControlObject) and (TcxDragControlObject(Source).Control is TcxListBox) then //hier geändert
das hier daraud gemacht
Delphi-Quellcode:
 lSource := string(Source.ClassName);
    if (Source is TcxDragControlObject) and (TcxDragControlObject(Source).Control is TcxTreeView) then //hier geändert
funktioniert soweit, dass es keine fehlermeldung gibt. Er zeigt mir noch immer an, dass die Nummer schon in der Gruppe ist. Ich werd ma gucken was ich selber herausbekommen kann. Freue mich trotzdem auf Vorschläge

Geändert von Blubbel ( 4. Jul 2012 um 08:36 Uhr)
  Mit Zitat antworten Zitat