Autor Beitrag
Dargor
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 59

Win2k SP4, WinXP Pro SP1
D6 Pers
BeitragVerfasst: Fr 29.07.05 23:55 
Ich habe 2 Fragen zur Änderung der Farben einer Scrollbox:

1. Normalerweise ist es ja nicht möglich die standardmäßig blaue Farbe von selektierten Items von Listen-Komponenten (z.B. Scrollbox) zu ändern, da die Farbe von Windows vorgegeben ist. (Ich meine die blaue Markierung von Elementen)
Kann man es trotzdem irgendwie erreichen, die Farbe zu ändern? Mir ist dabei egal, ob per WinAPI, Messages oder durch eine Extra-Komponente.

2. Die Farbe der Scrollleiste ist ebenso standardmäßig durch Windows definiert: grau. Auch diese Farbe (und wenn irgendwie möglich auch das Aussehen) würde ich gern ändern.
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Sa 30.07.05 07:17 
user profile iconDargor hat folgendes geschrieben:
Ich habe 2 Fragen zur Änderung der Farben einer Scrollbox:

1. Normalerweise ist es ja nicht möglich die standardmäßig blaue Farbe von selektierten Items von Listen-Komponenten (z.B. Scrollbox) zu ändern, da die Farbe von Windows vorgegeben ist. (Ich meine die blaue Markierung von Elementen)
Kann man es trotzdem irgendwie erreichen, die Farbe zu ändern? Mir ist dabei egal, ob per WinAPI, Messages oder durch eine Extra-Komponente.

eine Scrollbox hat doch gar keine Selektierung. Du meinst eher eine Listbox, oder? Dort kannst du die Items selber zeichnen und den Eintrag, wenn er selektiert ist (gdselected in state), in einer anderen Hintergrundfarbe zeichnen. Das ist im Forum schon öfters diskutiert wurden, gugg nach Suche in: Delphi-Forum, Delphi-Library ONDRAWITEM

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Sa 30.07.05 09:11 
Oder Messages: WM_CTLCOLORLISTBOX [msdn.microsoft.com/l..._CTLCOLORLISTBOX.asp]
WM_CTLCOLORSCROLLBAR [msdn.microsoft.com/l...tlcolorscrollbar.asp]

mfg matze

_________________
si tacuisses, philosophus mansisses.
Dargor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 59

Win2k SP4, WinXP Pro SP1
D6 Pers
BeitragVerfasst: Sa 30.07.05 09:18 
Ja stimmt, hab die Scrollbox mit der Listbox verwechselt :roll:

Aber danke für die beiden Hinweise. Werde beides mal ausprobieren.
Dargor Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 59

Win2k SP4, WinXP Pro SP1
D6 Pers
BeitragVerfasst: Sa 30.07.05 15:48 
Die Suche nach ONDRAWITEM im DF hat mir weitergeholfen.
Hab dieses Thema gefunden, wo es um CheckListBoxen geht.