AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

GetItemAtPos macht bei Listbox manchmal probleme

Ein Thema von leonreiser · begonnen am 16. Jul 2015 · letzter Beitrag vom 10. Aug 2015
 
leonreiser

Registriert seit: 16. Jul 2015
30 Beiträge
 
Delphi XE8 Professional
 
#4

AW: GetItemAtPos macht bei Listbox manchmal probleme

  Alt 16. Jul 2015, 16:07
Natürlich. Also hier hab ich noch die zwei Routinen für das Füllen und leeren. Dabei soll man sozusagen mit einem Klick auf ein Item jenes in die jeweils andere
Listbox schreiben:
Delphi-Quellcode:
procedure TForm2.ListBox1Click(Sender: TObject);
var
I :Integer;
begin
  for I := 0 to ListBox1.Count-1 do
    if ListBox1.Selected[I] = True then begin
        ListBox2.Items.Add(ListBox1.Items[I] + '');

       ListBox1.Items.Delete(I);
        break;
    end;
    ListBox1.Height := 16 * ListBox1.Count; // geschmackssache
    ListBox2.Height := 16 * ListBox2.Count; // geschmackssache

end;

procedure TForm2.ListBox2Click(Sender: TObject);
var
I :Integer;
begin
  for I := 0 to ListBox2.Count-1 do
    if ListBox2.Selected[I] = True then begin
      // SortType[I] := Null;
      ListBox2.Items[I] := StringReplace(ListBox2.Items[I], '','',[rfReplaceAll , rfIgnoreCase]);
      ListBox2.Items[I] := StringReplace(ListBox2.Items[I], '','',[rfReplaceAll , rfIgnoreCase]);
        ListBox1.Items.Add(ListBox2.Items[I]);
        ListBox2.Items.Delete(I);
        break;
    end;
  ListBox1.Height := 16 * ListBox1.Count; // geschmackssache
    ListBox2.Height := 16 * ListBox2.Count; // geschmackssache
end;
  Mit Zitat antworten Zitat
 

 

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 11:01 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 by Thomas Breitkreuz