AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

TListView.OnDrawItem

Ein Thema von WojTec · begonnen am 15. Nov 2010 · letzter Beitrag vom 17. Nov 2010
Antwort Antwort
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.879 Beiträge
 
Delphi 11 Alexandria
 
#1

AW: TListView.OnDrawItem

  Alt 15. Nov 2010, 20:07
Call the standard Draw-Routine after you set the new Color
Markus Kinzler
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#2

Re: TListView.OnDrawItem

  Alt 15. Nov 2010, 20:10
What you mean? I'm not pro in owner drawing Could you give me an example?
  Mit Zitat antworten Zitat
mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.879 Beiträge
 
Delphi 11 Alexandria
 
#3

AW: TListView.OnDrawItem

  Alt 15. Nov 2010, 20:28
Have a look on onCustomDraw
Markus Kinzler
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#4

Re: TListView.OnDrawItem

  Alt 16. Nov 2010, 09:42
I tried OnCustomDraw and OnCustomDrawItem and set in both DefaultDraw to True. And I still don't have default selection. How to use it?
  Mit Zitat antworten Zitat
Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#5

AW: TListView.OnDrawItem

  Alt 16. Nov 2010, 09:50
TListview doesn't support the themed selection rectangle out of the box. You have to activate it manually by calling SetWindowTheme(Listview.Handle, 'Explorer', nil);
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
482 Beiträge
 
Delphi XE6 Professional
 
#6

Re: TListView.OnDrawItem

  Alt 16. Nov 2010, 10:03
I added it to OnCreate, this is good procedere?
Still no effect OnDrawItem should be in OnCustomDrawItem? But this don't have Rect parameter. Don't have idea how to do it
  Mit Zitat antworten Zitat
Namenloser

Registriert seit: 7. Jun 2006
Ort: Karlsruhe
3.724 Beiträge
 
FreePascal / Lazarus
 
#7

AW: TListView.OnDrawItem

  Alt 16. Nov 2010, 12:43
Does it work if you don't use any owner/custom drawing code?

Btw: As you're already using clGrayText , why not use clWindowText for regular text as well? Depending on the settings, text may not always be black by default. In general, you should avoid combining environment colors with hard coded colors, because it can get ugly (e.g. black text on a black background) if someone uses different settings.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:33 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