Lazarus

Programming => General => Topic started by: Robert William Blennerhed on October 25, 2020, 09:46:55 am

Title: ListBox don't show items in new Lazarus?
Post by: Robert William Blennerhed on October 25, 2020, 09:46:55 am
You have to click in the listbox to get an item appear. It wasn't this in Lazarus before versions!!!

How to solve it?
Thanks in advance
Bug?
Title: Re: ListBox don't show items in new Lazarus?
Post by: wp on October 25, 2020, 11:34:18 am
Your Lazarus/fpc versions? Bitness? Operating system/widgetset? Did you owner-draw the listbox items?

Please post a simple project showing the issue.
Title: Re: ListBox don't show items in new Lazarus?
Post by: Bart on October 25, 2020, 12:42:17 pm
What is ItemIndex at design time?
If it is -1, it should not show any text (unless you set the Text property).
Title: Re: ListBox don't show items in new Lazarus?
Post by: MarkMLl on October 25, 2020, 12:55:06 pm
I'm watching this with interest. I've definitely seen oddities in Lazarus-trunk with gtk2 on KDE, e.g. the filename (but possibly not extension) vanishing in a dialog(ue) box.

Sorry, I think that I should probably have raised it earlier but I wasn't sure whether to put it down to overwork and over-active imagination :-)

MarkMLl
Title: Re: ListBox don't show items in new Lazarus?
Post by: Robert William Blennerhed on October 25, 2020, 01:27:19 pm
Here is my info.
Lazarus 2.0.10 r63526 FPC 3.2.0 x86_64-win64-win32/win64
Title: Re: ListBox don't show items in new Lazarus?
Post by: jamie on October 25, 2020, 01:45:40 pm
i can produce that same effect in any version by simply changing the font.color to white of the parent, which in this case is the form and the text is not be there unless you highlight it..

 I don't know what to say, maybe the themes of windows is messed up?

 I too have notice recently things disappearing while in drawing session but this is on several versions of laz running on win 10.

  This may have something to do with recent windows updates.

 maybe there is some issues getting fonts correctly set ?

 I've also been seeing strange graphic effects with Delphi 10 on win 10-64 so I don't think its an isolated case.
Title: Re: ListBox don't show items in new Lazarus?
Post by: Robert William Blennerhed on October 25, 2020, 01:50:31 pm
Thanks Jamie. I thought so too. It is certanly a Windows 10 issue when You say it.
Really bad. Windows dominate with their Developing tools.
Google do the same with Android Studio.
What the Hell can we do about it?
/Bob
Title: Re: ListBox don't show items in new Lazarus?
Post by: wp on October 25, 2020, 03:44:12 pm
i can produce that same effect in any version by simply changing the font.color to white of the parent, which in this case is the form and the text is not be there unless you highlight it..
What is "white of the parent"? Of course, when you set the font color to white you won't see any text on the white background of the listbox.
Title: Re: ListBox don't show items in new Lazarus?
Post by: jamie on October 25, 2020, 04:02:53 pm
yes but at times if the font does not get initialized in the correct order and then when referencing it , it will return clWHite as a default color, seen many times when a form is not fully painted the first time, its all white which is also another effect I have been seeing since a windows update.

  even the browser is doing it at times..

 basically I guess before a form is shown now maybe there should be check point for a valid font and brush otherwise they normally default to white.
Title: Re: ListBox don't show items in new Lazarus?
Post by: wp on October 25, 2020, 04:07:34 pm
What the Hell can we do about it?
As I said: provide a compilable sample project for testing. I'd guess that 90% of these "bugs" are user errors. I am having listboxes in numerous programs, all on Win10, and never have seen this issue.
TinyPortal © 2005-2018