Recent

Author Topic: What's wrong with TListBox and Mpuse On/Mouse Off?  (Read 263 times)

jipété

  • Full Member
  • ***
  • Posts: 182
What's wrong with TListBox and Mpuse On/Mouse Off?
« on: September 20, 2024, 08:43:11 am »
Hi,

I put a TListBox on a TPanel with alClient, I change his .Color property to Yellow, I add 3 items in FormCreate, F9 it's ok BUT if I move the mouse outside of the TListBox, it's becomes strange.
See attached image.

Is it me or is it the TListBox object ?

Thanks,

Linux Debian 11.9, FPC 3.2.2 Laz 3.4

zeljko

  • Hero Member
  • *****
  • Posts: 1648
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: What's wrong with TListBox and Mpuse On/Mouse Off?
« Reply #1 on: September 20, 2024, 09:48:41 am »
It is about gtk2 theme, not about listbox.

dsiders

  • Hero Member
  • *****
  • Posts: 1250
Re: What's wrong with TListBox and Mpuse On/Mouse Off?
« Reply #2 on: September 20, 2024, 09:49:50 am »
Hi,

I put a TListBox on a TPanel with alClient, I change his .Color property to Yellow, I add 3 items in FormCreate, F9 it's ok BUT if I move the mouse outside of the TListBox, it's becomes strange.
See attached image.

Is it me or is it the TListBox object ?

Linux Debian 11.9, FPC 3.2.2 Laz 3.4

Looks like your theme displays the text for the current selection in white. White text on a yelolow background is always going to be a problem.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

jipété

  • Full Member
  • ***
  • Posts: 182
Re: What's wrong with TListBox and Mpuse On/Mouse Off?
« Reply #3 on: September 20, 2024, 10:53:45 am »
Thanks for the replies.

Anyway, when the mouse is off, where is the selected color ? The text stays selected, more or less (look at the medley white-gray in the bottom of the LB, see attached image) but the rectangle disappears...

If I remember correctly there is an option in the ShellTreeView (HideSelection) to keep lhe selection bar, why not in the ListBox ?

Maybe I'll follow the stv's road...

 

TinyPortal © 2005-2018