Autor Beitrag
Dr. Phil
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 66

Win XP
Delphi 7 Prof.
BeitragVerfasst: Di 17.08.04 09:50 
Hallo,

ich bekomme in eine Variable z einen Integerwert.
Jetzt will ich die entsprechende Zeile in einem ListView markieren:
ausblenden Delphi-Quelltext
1:
lvFilme.Item.items[z-1].selected := True;					

Ja, schön wärs wenn das auch funktionieren würde.

Ich benutze fürs Listview den vsReport-Style, und habe RowSelect aktiviert sowie Multiselect deaktiviert.

Hat jemand einen Vorschlag wie das besser zu machen wäre?

Danke im Voraus,
Dr.Phil

_________________
self-improvement is masturbation;
self-destruction is the answer - Tyler Durden
ghhe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Di 17.08.04 09:54 
hm hast du recht das würd ich auch gern wissen bei mir funktioniert das mit dem selected auch nicht. Man könnte noch den Focus drauf setzen aber das funzt auch nicht so wirklich.

Würd mich auch interesieren ... ich bleib mal an dem post hier dran.

MfG ghhe
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Di 17.08.04 09:58 
Hallo.

Das Stichwort lautet "ItemIndex".

Cu,
Udontknow
Dr. Phil Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 66

Win XP
Delphi 7 Prof.
BeitragVerfasst: Di 17.08.04 10:01 
Auch wenn ich folgendes schreibe:lvFilme.ItemIndex := z-1
Passiert nichts. Sehr komisch ist das alles.

_________________
self-improvement is masturbation;
self-destruction is the answer - Tyler Durden
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Di 17.08.04 10:16 
Ist HideSelection auf False gesetzt? Wenn es True ist, wird die Selektion "versteckt", bis die LV den Fokus erhält.

Cu,
Udontknow
Dr. Phil Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 66

Win XP
Delphi 7 Prof.
BeitragVerfasst: Di 17.08.04 10:20 
Ah das war's :roll:

Dankeschön!

_________________
self-improvement is masturbation;
self-destruction is the answer - Tyler Durden
ghhe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Di 17.08.04 10:24 
also für alle die es nicht wissen:

die eigenschaft HideSelection muss auf FALSE gesetzt sein.
dann kann man mit
ausblenden Quelltext
1:
ListView1.ItemIndex:=zeilennummer;					

den eintrag makieren.

Danke euch ;) thema beendet *g*

MfG ghhe
Udontknow
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2596

Win7
D2006 WIN32, .NET (C#)
BeitragVerfasst: Di 17.08.04 10:57 
Na, der Eintrag wird schon selektiert, nur sieht der Benutzer das eben nicht, solange der Fokus nicht auf der LV ist.

Cu,
Udontknow