Combobox color

Combobox color

Postby Enrico Maria Giordano » Thu Aug 16, 2012 3: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: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Re: Combobox color

Postby Eoeo » Wed Aug 29, 2012 8:00 am

here run ok

Image



How it should be?
User avatar
Eoeo
 
Posts: 222
Joined: Mon Jun 04, 2012 12:00 pm

Re: Combobox color

Postby Enrico Maria Giordano » Thu Aug 30, 2012 4: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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Combobox color

Postby Enrico Maria Giordano » 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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Re: Combobox color

Postby Silvio.Falconi » Mon May 27, 2013 8:48 am

Any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Combobox color

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Combobox color

Postby Enrico Maria Giordano » 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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Combobox color

Postby Antonio Linares » Mon May 27, 2013 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Combobox color

Postby Enrico Maria Giordano » Mon May 27, 2013 4: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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Combobox color

Postby Antonio Linares » Mon May 27, 2013 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Combobox color

Postby Enrico Maria Giordano » Mon May 27, 2013 7: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
User avatar
Enrico Maria Giordano
 
Posts: 8713
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests