FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Combobox color
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Combobox color

Posted: Thu Aug 16, 2012 03:19 PM
I would find a way to assign a color to a combobox. The following sample only colors the boundaries of the combobox and its popup list:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oCbx, cItem := ""

    DEFINE DIALOG oDlg;
           SIZE 800, 600

    @ 1, 1 COMBOBOX oCbx VAR cItem;
           SIZE 300, NIL;
           ITEMS { "", "This is a test" };
           COLOR CLR_WHITE, CLR_HRED

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


Thank you in advance.

EMG
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 222
Joined: Mon Jun 04, 2012 12:00 PM

Re: Combobox color

Posted: Wed Aug 29, 2012 08:00 AM
here run ok





How it should be?
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Combobox color

Posted: Thu Aug 30, 2012 04:48 PM

I forgot to mention that the problem shows up only when the manifest file is linked in. In such situation the combobox is not colored at all (except the dropdown part).

EMG

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Combobox color

Posted: Mon Sep 03, 2012 11:47 AM

Any ideas? I need to color the combobox. It was possible under XP but not under Vista and newer Windows releases.

EMG

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: Combobox color

Posted: Mon May 27, 2013 08:48 AM

Any solution ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Combobox color

Posted: Mon May 27, 2013 11:22 AM

Enrico,

If you are using themes then you are telling Windows to control the painting.

If you want to control the painting, try to create the combobox from the ON INIT clause of the dialog.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Combobox color

Posted: Mon May 27, 2013 11:39 AM
Antonio Linares wrote:Enrico,

If you are using themes then you are telling Windows to control the painting.


Yes, but why I can change textbox color, even with themes?

EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Combobox color

Posted: Mon May 27, 2013 03:32 PM

Enrico,

Because Windows controls that painting and does not allows it. And you have authorized Windows to do it, telling it to use themes :-)

When you create a control from the ON INIT clause of ACTIVATE DIALOG, usually themes are not used (or they are not so restrictives).

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Combobox color

Posted: Mon May 27, 2013 04:53 PM
Antonio,

Antonio Linares wrote:Enrico,

Because Windows controls that painting and does not allows it. And you have authorized Windows to do it, telling it to use themes :-)


Yes, I know. But my question was, why I can change textbox colors and cannot change combobox ones?

EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Combobox color

Posted: Mon May 27, 2013 07:34 PM

Enrico,

Because the themes change combobxes but on GETs only change the borders.

Windows themes change the appareance of the combos entirely, but not on the GETs.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Combobox color

Posted: Mon May 27, 2013 07:43 PM
Antonio,

Antonio Linares wrote:Enrico,

Because the themes change combobxes but on GETs only change the borders.

Windows themes change the appareance of the combos entirely, but not on the GETs.


Understood... :-)

EMG

Continue the discussion