Autor Beitrag
Lemon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 96

Win XP
D5 Standart
BeitragVerfasst: Fr 05.03.04 18:56 
hallo,

ich moechte gerne wissen, wie man feststellt, welches item der komponente checklistbox angeklickt wurde.
wie geht das???

lemon
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 05.03.04 19:05 
Genau wie bei einer normalen Listbox auch.
Schau dir bitte mal "ItemIndex" in der Hilfe an.
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Fr 05.03.04 19:31 
Ich glaube der meint ob ein Item ein Check hat. Das kann man so prüfen:

ausblenden Delphi-Quelltext
1:
if CheckListBox.Checked[Index] then ...					


Wobei Index eine Itemnummer ist. Es sollte vorher geprüft werden ob die Index Nummer kleiner/gleich ist als Count - 1, sonnst gibts eine Fehlermeldung.

_________________
Popov
Lemon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 96

Win XP
D5 Standart
BeitragVerfasst: Sa 06.03.04 11:40 
ich meine, wenn man auf die checklistbox draufklickt, dann hat doch ein item den fokus. und nun moechte ich wissen welches.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 06.03.04 12:10 
welches item den focus hat bekommst du über itemindex raus. welche items gecheckt sind über checked !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Lemon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 96

Win XP
D5 Standart
BeitragVerfasst: Sa 06.03.04 18:30 
danke, hat funktioniert!!