AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Drag&Drop mit TcxListBox und TcxTreeList

Ein Thema von Blubbel · begonnen am 3. Jul 2012 · letzter Beitrag vom 5. Jul 2012
Antwort Antwort
Blubbel

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

AW: Drag&Drop mit TcxListBox und TcxTreeList

  Alt 3. Jul 2012, 16:34
Ok ein Problem gelöst. Habe vergessen DragMode auch Automatisch zu setzen.

Jetzt zeigt er mir ja aber noch an, dass sich die Nummer schon in dieser einen Gruppe befindet, obwohl da noch nichts drin steht.

ich werde mir mal meine Hilfsfunktionen angucken, ggbf euch zur Verfügung stellen.

Wenn cihs nun Durchsteppe geht schon die 2. If-Abfrage schief.

Geändert von Blubbel ( 3. Jul 2012 um 16:38 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von Bummi
Bummi

Registriert seit: 15. Jun 2010
Ort: Augsburg Bayern Süddeutschland
3.470 Beiträge
 
Delphi XE3 Enterprise
 
#2

AW: Drag&Drop mit TcxListBox und TcxTreeList

  Alt 3. Jul 2012, 22:28
bei cx geht das etwas um die Ecke ala

TcxDragControlObject(Source).Control
Thomas Wassermann H₂♂
Das Problem steckt meistens zwischen den Ohren
DRY DRY KISS
H₂ (wenn bei meinen Snipplets nichts anderes angegeben ist Lizenz: WTFPL)
  Mit Zitat antworten Zitat
Blubbel

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

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
Furtbichler
(Gast)

n/a Beiträge
 
#4

AW: Drag&Drop mit TcxListBox und TcxTreeList

  Alt 4. Jul 2012, 08:35
Du siehst den Wald nicht mehr
Delphi-Quellcode:
if (Source is TcxDragControlObject) and (TcxDragControlObject(Source).Control is TcxListBox) then
    begin
      TheListBox := TcxListBox(TcxDragControlObject(Source).Control);
      i := TheListBox.ItemIndex;
  Mit Zitat antworten Zitat
Blubbel

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

AW: Drag&Drop mit TcxListBox und TcxTreeList

  Alt 4. Jul 2012, 08:40
Danke!! Jetzt meckert er weiter ich schau mal was ich tun kann... wenn ich gar nicht mehr weiter weiß schrei ich ganz laut

Hier ist der Schrei!!!
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
      lst1 := TcxListBox(TcxDragControlObject(Source).Control); //Hier auch geändert
      i := lst1.ItemIndex;

      if (i >= 0) then
      begin
        lNumber := TphCSNumber(TcxListBox(Source).Items.Objects[i]); //Fehlermeldung
        {Im Projekt *.exe ist eine Exception der Klasse EAccessViolation mit der Meldung
        'Zugriffsverletzung bei Adresse 0087A5DE in Modul '*.exe'. Lesen von Adresse 00000280' aufgetreten}

        if Assigned(lNumber) then
        begin

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

n/a Beiträge
 
#6

AW: Drag&Drop mit TcxListBox und TcxTreeList

  Alt 4. Jul 2012, 08:53
Blubbel: Der Wald. Die Bäume.

Delphi-Quellcode:
// So geht also der Zugriff auf die Listbox
lst1 := TcxListBox(TcxDragControlObject(Source).Control);
i := lst1.ItemIndex;
if (i >= 0) then begin
  lNumber := TphCSNumber(TcxListBox(Source).Items.Objects[i]); //Fehlermeldung
{ Wie geht nochmal der Zugriff auf die Listbox? *Mitdenfingernaufdemtischtrommel* }
  Mit Zitat antworten Zitat
Blubbel

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

AW: Drag&Drop mit TcxListBox und TcxTreeList

  Alt 4. Jul 2012, 09:05
Ich geh jetzt sterben...
  Mit Zitat antworten Zitat
Antwort Antwort

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:29 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz