![]() |
Re: Problem mit ComboBox
Label1.Visible
|
Re: Problem mit ComboBox
Zitat:
|
Re: Problem mit ComboBox
Delphi-Quellcode:
Label1.Visible := (ComboBox1.ItemIndex = 1) and (ComboBox2.ItemIndex = 1);
|
Re: Problem mit ComboBox
Und wenn man das jetzt in den Ouelltext einbauen würde? :wiejetzt:
|
Re: Problem mit ComboBox
Einfach nach dem Case
|
Re: Problem mit ComboBox
Dann kommt das [Fehler] Unit1.pas(32): Konstantenausdruck erwartet
|
Re: Problem mit ComboBox
Delphi-Quellcode:
begin
case ComboBox1.ItemIndex of 0 : Label1.Caption := '1'; 1 : begin Label1.Visible := ComboBox2.ItemIndex = 1; //man könnte hier auch noch vorher auf visible abfragen Label1.Caption := '2'; end; 2 : Label1.Caption := '3'; end; end; |
Re: Problem mit ComboBox
Wenn ich ComboBox1 auf 1 stelle und ComboBox2 auf 2 dann zeigt er trozdem 1 an.
Ich möchte aber das er nur 1 anzeigt wenn beide ComBoxen auf 1 stehen. |
Re: Problem mit ComboBox
Du hast eigentlich alles was du brauchst. Du musst also nur den Code an die gewünschten Bedingungen anpassen
|
Re: Problem mit ComboBox
Was ich gepostet habe, war die Ereignisbehandlung von ComboBox1. Es sollte nicht allzu schwierig sein, das auch auf ComboBox2 zu übertragen, oder? :stupid:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:48 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