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 ComboBox-Style = csDropDownList: Rect des Items entfernen??? (https://www.delphipraxis.net/130748-combobox-style-%3D-csdropdownlist-rect-des-items-entfernen.html)

romber 12. Mär 2009 14:58


ComboBox-Style = csDropDownList: Rect des Items entfernen???
 
Ich habe ein ComboBox mit der Eigenschaft Style := csDropDownList und möchte den Rand des selektierten Items entfernen. OnDrawItem, wo man sonnst so etwas macht, tritt nur ein, tritt bei dieser Style nicht ein. Wie mache ich das denn?

_BlackDragon_ 12. Mär 2009 15:20

Re: ComboBox-Style = csDropDownList: Rect des Items entferne
 
Hi,

du müsstest den Style auf csOwnerDrawFixed oder auf csOwnerDrawVariable umstellen.

Bei csOwnerDrawFixed tritt das Ereignis OnDrawItem auf und bei csOwnerDrawVariable zusätzlich
noch das Ereignis OnMeasureItem.

Gruss

BlackDragon

romber 12. Mär 2009 16:31

Re: ComboBox-Style = csDropDownList: Rect des Items entferne
 
Danke für schnelle Antwort!
Zitat:

Zitat von _BlackDragon_
du müsstest den Style auf csOwnerDrawFixed oder auf csOwnerDrawVariable umstellen.

Und genau das ist das Problem, wie ich oben schon geschrieben habe. Der Style MUSS csDropDownList sein und ohne Rect!

Helmi 12. Mär 2009 16:52

Re: ComboBox-Style = csDropDownList: Rect des Items entferne
 
Hallo,

Zitat:

Zitat von romber
Und genau das ist das Problem, wie ich oben schon geschrieben habe. Der Style MUSS csDropDownList sein und ohne Rect!

Aber warum muss das genau "csDropDownList" sein?

Bei "csOwnerDrawFixed" oder "csOwnerDrawVariable" kannst du das Rect wegprogrammieren.
Anderweitig denke ich nicht das es geht.

Für die Textanzeige musst du dich aber selbst kümmern.

romber 12. Mär 2009 19:39

Re: ComboBox-Style = csDropDownList: Rect des Items entferne
 
Zitat:

Zitat von Helmi
Aber warum muss das genau "csDropDownList" sein?

Am schnellsten kannst man es nachvollziehen, wenn man unter Windows Vista programmiert. Eine ComboBox mit der Style "csDropDownList" sieht absolut anders aus, als mit einem anderen Style.


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