Recent

Author Topic: TCheckComboBox ghost  (Read 5396 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
TCheckComboBox ghost
« on: September 29, 2021, 05:58:10 am »
The TCheckComboBox ghosts the visible element. See attached pic and trivial project.

Lazarus + FPC - main branches as of 24 Sep 2021.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: TCheckComboBox ghost
« Reply #1 on: September 29, 2021, 07:52:04 am »
I expect its the same with other components in quite unpredictable situations.  I have reported it....
Only ever seen it on Cocoa.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: TCheckComboBox ghost
« Reply #2 on: September 29, 2021, 02:16:21 pm »
Bug number? (To add to) I did search your bugs but there were only two and not relevant.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: TCheckComboBox ghost
« Reply #3 on: September 30, 2021, 02:01:08 am »
https://forum.lazarus.freepascal.org/index.php/topic,53055.0.html

It seemed to be sufficiently well known about for me to not bother with a bug report.  I quote -

"it has been haunting CocoaWS from the start."

You contributed to that particular thread too.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: TCheckComboBox ghost
« Reply #4 on: September 30, 2021, 03:33:50 am »
That thread was about upside down text, not ghosting text and was resolved in trunk, at least for my issues.

I’ll log a bug 😇

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: TCheckComboBox ghost
« Reply #5 on: October 02, 2021, 06:08:24 am »
a couple of issues are happening here:
*OwnerDraw style is not fully supported. It doesn't hide the text
*The theme information is returning a bit odd results. The checkbox width seems to be too wide and the top offset it too low.

As trev mentioned, this is definitely not the issue that is "haunting CocoaWS from the start."

ChrisR

  • Full Member
  • ***
  • Posts: 247
Re: TCheckComboBox ghost
« Reply #6 on: October 02, 2021, 01:44:12 pm »
I use the method from here
  https://wiki.freepascal.org/TComboBox#Preceded_image
I use the base color of the combobox as the background to erase the background
    ComboBox1.Canvas.Brush.Color:= ComboBox1.Color;
It works pretty well. It does not show the currently selected item as highlighted, and so is useless for navigation with arrow keys.

Perhaps others can suggest how I determine the themes highlight colors or any other suggestions.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: TCheckComboBox ghost
« Reply #7 on: October 03, 2021, 12:26:11 am »
you might want to try this branch:
https://github.com/skalogryz/Lazarus/tree/cocoa

it gets rid of the "ghosting" but the placement is not great yet.

upd: the placement should be more reasonable now as well.
« Last Edit: October 03, 2021, 07:20:24 am by skalogryz »

 

TinyPortal © 2005-2018