FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Changing Foreground and Background Colors of ComboBox
Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 07:52 AM

Good Morning,

I have tried evey possible combination of color settings (I think) but I cannot get the colors of my ComboBoxes right.

Everywhere in my system (for Get's) I use:

ReDefine Get ... Color CLR_BLUE

and this works perfectly BUT

ReDefine ComboBox ... Color CLR_BLUE Items ...

does nothing i.e. the text display is still Black.

I just need to change the foreground or text color to the same blue as the text of the gets but every time I try to add different color settings like:

ReDefine ComboBox ... Color CLR_BLUE, CLR_BLACK Items ...

or something like that I just don't seem to be able to change ONLY the foreground text color i.e. I seem to manage to make the while thing unreadable.

Any ideas?

Regards,

Dale.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 07:55 AM

Use SetColor() method.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 07:57 AM

Dale,

Is it a dropdown or a dropdownlist combobox ?

If it has an editable get then it is dropdown.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 08:01 AM

Hello,

That was quick!

Enrico: SetColor( ) to what?

Antonio: It does not have an editable get.

Thanks,

Dale.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 08:08 AM

oCbx:SetColor( CLR_RED, CLR_GREEN )

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 08:12 AM

Dale,

When you use:

REDEFINE COMBOBOX ... COLOR ...

that color is used when the combobox has no focus (for a dropdownlist combobox as you are using). When focused, the used color is the system color for selected items (right click on the desktop, properties, appareance, selected items).

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 09:02 AM

Ok - I think I understand.

But - are Gets handled the same way i.e. when focused they use the system colors or is it just the ComboBox that works this way?

I have no problem with Gets and Says.

Regards,

Dale.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Changing Foreground and Background Colors of ComboBox
Posted: Fri Mar 24, 2006 09:23 AM

Dale,

It is a combobox specific Windows behavior.

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion