Recent

Author Topic: ListBox don't show items in new Lazarus?  (Read 427 times)

Robert William Blennerhed

  • Sr. Member
  • ****
  • Posts: 304
  • Love my Wife, My Kids and Lazarus/Freepascal.
    • Spelstatistiken.se
ListBox don't show items in new Lazarus?
« 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?
« Last Edit: October 25, 2020, 09:53:37 am by Robert William Blennerhed »
%

wp

  • Hero Member
  • *****
  • Posts: 7729
Re: ListBox don't show items in new Lazarus?
« Reply #1 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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

Bart

  • Hero Member
  • *****
  • Posts: 4030
    • Bart en Mariska's Webstek
Re: ListBox don't show items in new Lazarus?
« Reply #2 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).
« Last Edit: October 25, 2020, 01:03:23 pm by Bart »

MarkMLl

  • Hero Member
  • *****
  • Posts: 1447
Re: ListBox don't show items in new Lazarus?
« Reply #3 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
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.

Robert William Blennerhed

  • Sr. Member
  • ****
  • Posts: 304
  • Love my Wife, My Kids and Lazarus/Freepascal.
    • Spelstatistiken.se
Re: ListBox don't show items in new Lazarus?
« Reply #4 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
%

jamie

  • Hero Member
  • *****
  • Posts: 3790
Re: ListBox don't show items in new Lazarus?
« Reply #5 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.
The only true wisdom is knowing you know nothing

Robert William Blennerhed

  • Sr. Member
  • ****
  • Posts: 304
  • Love my Wife, My Kids and Lazarus/Freepascal.
    • Spelstatistiken.se
Re: ListBox don't show items in new Lazarus?
« Reply #6 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
%

wp

  • Hero Member
  • *****
  • Posts: 7729
Re: ListBox don't show items in new Lazarus?
« Reply #7 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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

jamie

  • Hero Member
  • *****
  • Posts: 3790
Re: ListBox don't show items in new Lazarus?
« Reply #8 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.
The only true wisdom is knowing you know nothing

wp

  • Hero Member
  • *****
  • Posts: 7729
Re: ListBox don't show items in new Lazarus?
« Reply #9 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.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

 

TinyPortal © 2005-2018