Recent

Author Topic: Font color DBLookupComboBox  (Read 10174 times)

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Font color DBLookupComboBox
« on: August 16, 2010, 12:56:48 pm »
When I change the font color of a TDBLookupComboBox the font shown in the edit box indeed has the new color, but the pulldown list still has its black font color.
Does anyone know how to give the font in the list the same color as shown in the edit box
(or is there another - third party - control that has this ability)?

Jan
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Font color DBLookupComboBox
« Reply #1 on: August 19, 2010, 01:23:57 pm »
Doesn't anyone has any ideas????
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Font color DBLookupComboBox
« Reply #2 on: August 19, 2010, 02:32:29 pm »
First of all: http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum_.3F

For me it worked with the standard TComboBox with Lazarus 0.9.29 on win32. Maybe you need to update your Lazarus.

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Font color DBLookupComboBox
« Reply #3 on: August 19, 2010, 11:50:13 pm »
I'm using the latest stable version 0.9.28.3 on one computer and yesterdays snapshot 0.9.29 version on another (both running on Windows 7) and in both versions the edit box part of the dblookupcombobox shows the correct font color but the dropdown part shows black font color.
So it's not a matter of upgrading Lazarus.
What operating system does your correct showing combobox run?
Maybe it works on Linux but not on Windows?

 :o
Jan
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Font color DBLookupComboBox
« Reply #4 on: August 22, 2010, 08:15:05 pm »
Still no one any ideas or suggestions?
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Font color DBLookupComboBox
« Reply #5 on: August 22, 2010, 09:16:29 pm »
Still no one any ideas or suggestions?

Suggestion 1: Leave the color as it is like all professionial software does.
Suggention 2: Use OnDrawItem event to paint it yourself (Set Style to csOwnerDrawFixed)

JanRoza

  • Hero Member
  • *****
  • Posts: 672
    • http://www.silentwings.nl
Re: Font color DBLookupComboBox
« Reply #6 on: August 22, 2010, 11:35:12 pm »
Even professional software uses colored fonts when it's functional so suggestion #1 is not an option. I think having two colors in one component is what look unprofessional.
Suggestion #2 is worth trying so I'll go that way.
Still I think that selecting a font color in a component should do what it is supposed to do for the whole component and not just half. A workaround should not be necessary.
The component I use in Delphi works correctly, so I expected the corresponding component in Lazarus to do the same.
Is it not a bug if the box font does change color and the dropdown font doesn't?

I know it's just a minor snag but in a program as good and professional as Lazarus there should be as little snags as possible.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
       Lazarus 3.2 FPC 3.2.2
       CodeTyphon 8.40 FPC 3.3.1

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Font color DBLookupComboBox
« Reply #7 on: August 23, 2010, 12:12:27 am »
Still I think that selecting a font color in a component should do what it is supposed to do for the whole component and not just half. A workaround should not be necessary.

You could implement this feature and create a patch for the LCL.
Please test on all supported widget sets.
http://wiki.lazarus.freepascal.org/Creating_A_Patch


 

TinyPortal © 2005-2018