FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Listbox Not Focused Color
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Listbox Not Focused Color
Posted: Mon Jan 31, 2011 08:11 PM

Hello,

How can I set the color of listbox row when the listbox is not focused?

oLbx1:nClrText = { || IIF( invdet->posted, CLR_WHITE, CLR_BLACK ) }
oLbx1:nClrPane = { || IIF( invdet->posted, CLR_GREEN, CLR_WHITE ) }

oLbx1:nClrForeFocus = { || IIF( invdet->posted, CLR_WHITE, CLR_WHITE ) }
oLbx1:nClrBackFocus = { || IIF( invdet->posted, CLR_GREEN, CLR_BLUE ) }

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Listbox Not Focused Color
Posted: Tue Feb 01, 2011 02:07 AM

Darrell,

I don't understand your question. nClrText and nClrPane ARE the unfocused colors.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: Listbox Not Focused Color
Posted: Tue Feb 01, 2011 02:49 AM
Hi James,

That is what I thought, however, when the screen opens and the focus is on data entry fields, the LISTBOX is grey

Here is the screen when the dialog box is opened, the listbox not in focus


Here is the screen once I tab to listbox and it is focused
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Listbox Not Focused Color
Posted: Tue Feb 01, 2011 04:36 PM

Darrell,

Ah, I see. You mean with the control is not focused, and I thought you meant when a row is not focused.

It is gray to indicate that the control is not focused. This is normal Windows behavior. I suggest not changing this as it will confuse users. I also suggest not showing other rows with the same background color as the highlighted row (as in your screenshots) as this makes it difficult to see which row is in focus. Also, remember there are a significant number of users that are colorblind so you need to pick colors that will show as different to users with the various types of colorblindness. If you are interested, I can give you a link to a website that will take your screenshot and convert it to the various ways colorblind people will see it.

regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 708
Joined: Fri Oct 28, 2005 09:53 AM
Re: Listbox Not Focused Color
Posted: Tue Feb 01, 2011 05:19 PM

Hi James,

Thank you for your assistance.

*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com

Continue the discussion