Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi OnChange Ereigniss in eine Combobox/Listbox legen (https://www.delphipraxis.net/114284-onchange-ereigniss-eine-combobox-listbox-legen.html)

mkinzler 23. Mai 2008 05:36

Re: OnChange Ereigniss in eine Combobox/Listbox legen
 
Genau das meinte ich

Roefe68 23. Mai 2008 19:33

Re: OnChange Ereigniss in eine Combobox/Listbox legen
 
Jetzt habe ich es so wie ich es wollte.
Hier die procedure:

Delphi-Quellcode:
procedure TForm1.Erzeuge_Editfeld(iPositionLinks,
                                  iPositionOben,
                                  iBreite,
                                  iEreignis_OnChange,
                                  iEreignis_OnKeyPress :integer;
                                  sKompName,
                                  sKompLabel,
                                  sKompText            :String;
                                  bVerschiebbar,
                                  bSichtbar,
                                  bAktiv               :boolean;
                                  ParentForm           :TWinControl);

begin
  try
    Edit_Array[AktuellesDynamischesEditfeld] := TEdit.Create(self);
    with Edit_Array[AktuellesDynamischesEditfeld] do
    begin
      Parent            := ParentForm;
      Name              :='Edit_'+sKompName;
      Left              := iPositionLinks+150;
      Top               := iPositionOben;
      //OnChange Event
      case iEreignis_OnChange of
        0: OnChange := Suchfeld_OnChange;
        1: OnChange := Provider_OnChange;
        else OnKeyPress := nil;
      end;
      //OnKeyPress Event
      case iEreignis_OnKeyPress of
        0: OnKeyPress := Suchfeld_Integer_OnKeyPress;
        1: OnKeyPress := Suchfeld_Float_OnKeyPress;
        2: OnKeyPress := Suchfeld_AlphaNum_OnKeyPress;
        else OnKeyPress := nil;
      end;
      OnMouseMove       := Komponente_OnMouseMove;
      Color             := clWhite;
      Text              := sKompText;
      Visible           := bSichtbar;
      Enabled           := bAktiv;
      Width             := iBreite;
    end;
    //ListBox_DynFelder.AddItem(Name,Edit_Array[AktuellesDynamischesEditfeld]);
    inc(AktuellesDynamischesEditfeld);

    //Label zur Komponente erzeugen
    Erzeuge_Label(iPositionLinks,iPositionOben,iBreite,sKompName,sKompLabel,true,true,true,ParentForm);

    except
    on E: Exception do
    begin
      LogException( 'Erzeuge_Editfeld: ', E );
    end;
  end; {try}
end;
Allen Vielen Dank
RWP


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:30 Uhr.
Seite 2 von 2     12   

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