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 [finished] Selektiertes Item aus ComboBox in edit, aber wie? (https://www.delphipraxis.net/62079-%5Bfinished%5D-selektiertes-item-aus-combobox-edit-aber-wie.html)

ghost007 30. Jan 2006 18:37


[finished] Selektiertes Item aus ComboBox in edit, aber wie?
 
Hallo,
ich habe eine ComboBox, in der man ein item auswählt, dann auch einen button klickt, und onclick auf dem button soll in die edit das selektierte item eingetragen werden.

Daniel B 30. Jan 2006 18:42

Re: Selektiertes Item aus ComboBox in edit, aber wie?
 
Delphi-Quellcode:
Edit.Text := ComboBox.
nachdem du den . geschrieben hast, drücke mal Strg+Space

PS: Vielleicht tut es das OnSelect-Event der Combo auch schon, kannst dir dann den Button sparen.

ghost007 30. Jan 2006 18:58

Re: Selektiertes Item aus ComboBox in edit, aber wie?
 
hm...
also
ich hab das:
Delphi-Quellcode:
Edit4.Text:=ComboBox1.Items.String[ ? ];
Aber was kommt bei dem '?' rein?

Daniel B 30. Jan 2006 19:02

Re: Selektiertes Item aus ComboBox in edit, aber wie?
 
ComboBox.Text

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Edit1.Text := ComboBox1.Text;
end;

//Oder ohne Button
procedure TForm1.ComboBox1Select(Sender: TObject);
begin
  Edit1.Text := ComboBox1.Text;
end;

ghost007 31. Jan 2006 13:12

Re: Selektiertes Item aus ComboBox in edit, aber wie?
 
Danke

damit hat sich das problem erledigt

:) :coder: :hi:


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:04 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz