Autor Beitrag
Fabian W.
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: So 11.09.05 13:12 
Hallo,
mich wundert's dass die Forensuche darüber nix ausgespuckt hat:
Ich muss Caption und alle Subitems eines bestimmten ListViewItems durchstreichen. Leider hab ich keine Egenschaft gefunden die da vielversprechend wäre. Kann mir ja jemand helfen?

Danke im Vorraus

Fabian
Fabian W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Mo 12.09.05 14:46 
Ich hab jetzt noch bei anderen, mir bekannten Foren und bei Google gesucht, aber leider nichts gefunden. Entweder ich verwende falsche Suchwörter oder es is schlicht und ergreifend nicht möglich (???).
Hatte vlt. schonmal irgendjemand so ein Problem??

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



BeitragVerfasst: Mo 12.09.05 15:01 
Ist dein TListView im Report Style? Willst du einen durchgehenden Strich oder wirklich nur jedes Wort?

_________________
Ciao, Sprint.
Fabian W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Mo 12.09.05 17:51 
Reportstyle, nur jedes Wort.
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Mo 12.09.05 18:14 
Ich weiss, warum Du darüber nirgenswo was gefunden hast: Weils so einfach ist :wink: :
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
  Sender.Canvas.Font.Style := [fsstrikeout];
  DefaultDraw := True;
end;
Fabian W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Di 13.09.05 16:26 
Genauer:
Ich hab ne Procedure, die ich zu fanz unterschiedlichen Ereignissen aufrufe. Die soll prüfen ob das Item checked = true is, und dann falls true alles Durchstreichen. Dann kommt das nächste Item....
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
  if Sender.checked then  //Oder TListItem(Sender).??
  begin
  Sender.Canvas.Font.Style := [fsstrikeout];
  DefaultDraw := True;
  end;
end;
Wäre dann die von dir vorgeschlagene Lösung?
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: Di 13.09.05 16:29 
@Fabian W.: NImm doch einfach Item...

AXMD

//EDIT: Unsinn entfernt :mrgreen:


Zuletzt bearbeitet von AXMD am Di 13.09.05 17:27, insgesamt 1-mal bearbeitet
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Di 13.09.05 17:21 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin

  if Sender.Checkboxes then
    if Item.Checked then
      Sender.Canvas.Font.Style := [fsStrikeOut];
  DefaultDraw := True;

end;

_________________
Ciao, Sprint.
Fabian W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1766

Win 7
D7 PE
BeitragVerfasst: Di 13.09.05 19:03 
Ich danke vielmals :mrgreen:
:think: