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 CheckListBoxen einstellen (https://www.delphipraxis.net/125902-checklistboxen-einstellen.html)

nixalsverdruss 14. Dez 2008 13:08


CheckListBoxen einstellen
 
Hi,
ich hab ein Problem: Wie kann ich es als if Klausel machen, dass das un das passiert, wenn ein Button gedrückt wird. So:
Delphi-Quellcode:
if (CheckListBox1.ItemIndex = 0) and (CheckListBox1.ItemIndex = 2) then close;
funkts nicht.
Danke schon mal
nixalsverdruss
PS: Ich hab Strings gemacht in der Listbox)

himitsu 14. Dez 2008 13:33

Re: CheckListBoxen einstellen
 
CheckListBox1.ItemIndex ist das (erste) selektierte/markierte Item
und überleg mal, kann eine Variable (hier ein Integer) 2 unterschiedliche Werte zugleich haben?

Delphi-Quellcode:
if (i = 0) and (i = 2) then ...
probier mal die Eigenschaft .Checked aus :wink:

nixalsverdruss 14. Dez 2008 13:34

Re: CheckListBoxen einstellen
 
Danke! So gehts! :lol:


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