Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Kleine ComboBox Frage (https://www.delphipraxis.net/40088-kleine-combobox-frage.html)

Grolle 10. Feb 2005 20:47


Kleine ComboBox Frage
 
Was ist daran falsch?
Delphi-Quellcode:
procedure TForm2.ComboBox1Change(Sender: TObject);
begin
  ComboBox1.Text := Edit1.Text;
end;
Im Edit Feld wird nix angezeigt.
Grolle

SirThornberry 10. Feb 2005 20:49

Re: Kleine ComboBox Frage
 
es ist genau falsch herum
Delphi-Quellcode:
Edit1.Text := ComboBox1.Text;

jfheins 10. Feb 2005 20:50

Re: Kleine ComboBox Frage
 
Delphi hat eine sehr gute Hilfe, drück einfach mal F1 ... (keine Angst, es bringt dich schon nicht um)

:mrgreen:

Grolle 10. Feb 2005 20:51

Re: Kleine ComboBox Frage
 
:oops:

Danke!

Interceptor 10. Feb 2005 20:52

Re: Kleine ComboBox Frage
 
Du möchtest also den ausgewählten Text in der Combobox auf ein Edit übertragen, wenn ich das recht sehe...

Dein Ansatz ist auch schon fast richtig ;)

Delphi-Quellcode:
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
  edit1.Text := combobox1.Text;
end;
So sollte das gehn

Brüggendiek 10. Feb 2005 20:55

Re: Kleine ComboBox Frage
 
Hallo Grolle!

Was soll das denn werden, wenn es mal fertig ist? :gruebel:
Zitat:

Zitat von Grolle
Im Edit Feld wird nix angezeigt.

So wie Du das programmiert hast, wird ja der Inhalt des Edit ausgelesen!

Vermutlich meinst Du das so rum:
Delphi-Quellcode:
procedure TForm2.ComboBox1Change(Sender: TObject);
begin
  Edit1.Text := ComboBox1.Text;
end;
Dann wird bei Änderungen der ComboBox das Ganze auch an das Edit-Feld gegeben.

Falls es das nicht ist, kann ich auch nicht weiter sagen.

Gruß

Dietmar Brüggendiek

jfheins 10. Feb 2005 21:02

Re: Kleine ComboBox Frage
 
Da gibt es schon dieses *supertolle* Feature, dass man informiert wird,
wenn jemand schneller war, und ihr postet trotzdem noch ... :roll:

:mrgreen:


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:02 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