Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mi 23.03.05 14:59 
Hi Hallo Begreif das mit der TComboBox nicht ganz :roll:

1. Wie kann ich machen dass man die Items nicht einfach herauslöschen und bearbeiten kann?
2. Wie kann ich zb wen man Item 2 auswählt dass das Programm schliesst ?
3. Wie geht dass das wenn in Combobox1 Item2 Markiert ist und in Combobox2 Item 3 das dass Programm dann etwas bestimmtes macht ?

Big DHX für eure Hilfe 8)


Moderiert von user profile iconAXMD: Topic aus Sonstiges verschoben am Mi 23.03.2005 um 15:23


Zuletzt bearbeitet von DelphiDelphin am Mi 23.03.05 15:10, insgesamt 1-mal bearbeitet
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mi 23.03.05 15:05 
Bitte deinen Titel ändern :mahn:

AXMD
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Mi 23.03.05 15:16 
Titel: Re: Begreif das mit der TComboBox nicht ganz kann jemand hel
DelphiDelphin hat folgendes geschrieben:
Wie kann ich machen dass man die Items nicht einfach herauslöschen und bearbeiten kann?

ausblenden Delphi-Quelltext
1:
ComboBox1.Style := csDropDownList;					


Zitat:
Wie kann ich zb wen man Item 2 auswählt dass das Programm schliesst ?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
  case ComboBox1.ItemIndex of
    1: Close;  // Item 2 - Form schließen
  end;
end;

_________________
Ciao, Sprint.
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mi 23.03.05 18:32 
Hi begreiffe nicht was falsch ist wie wäre es richtig :roll:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm3.Button1Click(Sender: TObject);
begin
If Combobox1.ItemIndex =  1 and Combobox2.ItemIndex = 2   then
begin
Close;
end;

end;
end.
wdbee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 628
Erhaltene Danke: 1



BeitragVerfasst: Mi 23.03.05 18:34 
Sorry, das war ein Fehler von mir! Habe übersehen, dass es zwei verschiedene Comboboxen sind!
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm3.Button1Click(Sender: TObject);  
begin  
  if (Combobox1.ItemIndex = 1) and (Combobox2.ItemIndex = 2) then    
    Close;  
end;


Zuletzt bearbeitet von wdbee am Mi 23.03.05 18:44, insgesamt 2-mal bearbeitet
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Mi 23.03.05 18:37 
Logo aber wie ist s dann richtig ich habe folgende lösung gefunden aber ob die Professionell ist Bezweifle ich :roll:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm3.Button1Click(Sender: TObject);
begin
If Combobox1.ItemIndex =  1    then
begin
If Combobox2.ItemIndex = 2 then
begin
close;
end;

end;

end;
end.
wdbee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 628
Erhaltene Danke: 1



BeitragVerfasst: Mi 23.03.05 19:05 
Siehe oben geänderte Version!
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mi 23.03.05 22:20 
user profile iconAXMD hat folgendes geschrieben:
Bitte deinen Titel ändern :mahn:

AXMD


Schreib ich chinesisch?

AXMD