Why are listboxes not showing rows of content?

I’ve seemingly successfully refactored my project to API.2

My files open fine, showing 565 rows of data so far this year, and switching them to others properly shows their data.

When I create a new file, I enter an initial item successfully. Save while closing, reopen the file, and both listboxes show absolutely nothing, as though they are not appearing though they always have on files I’ve used for months.

How do I get these to appear in the new files I’m creating?

Thanks for any pointers to fix this. A lot of time and work went into this to see new files failing like this. May be I’m SOL and out of business with this. If this is not fixable, I’ve wasted a lot of time refactoring to API.2.

I’m happy with the accomplishment and existing customers are not having a ton of bug issues, but new customers will if i can’t learn why these listboxes are not showing on new files.

I checked my previous build (API.1) using current 2025.2 and new file with a single entry show fine when the file is reopened. Create the same with my refactored project, listboxes are not showing. Still, when I open my current year’s file, no bugs, everything visible and working.

Please help if you know about this. Thanks in advance for your generosity. Twenty four years developing and producing this work, for it to fall like this is disgraceful. There IS a solve, yes?

Of course there’s a solution. However, you haven’t provided enough information to even guess at what’s going on.

1 Like

Is it possible to see your method ?

use debug.log and break points to see what is going on.
use listboxes with initial data in designer and look at runtime if this is displayed.
because you changed to api2 maybe a event is skipped, there was a lot renaming from api1 to 2 by xojo.
change to api2 can be done with provided menus in xojo ide.

The problem lies with dark mode (IMHO)…

I tried to delete this “second” thread. I showed a method and two screenshots at the other thread on “Bugs and Feature Requests”

The problem is not with dark mode because I’m colorizing the rows be the account number on the row.. I checked and when the colorizing is turned off, it is equally visible whether DarkMode is on or off.

That other thread in Bug and Feature Requests shows and includes explanation why the data is present in these files, and exportable to prove the data was there.

So there is a problem in the colorisation code.

…or the number of colums…

Not really a colorization problem. It’s intended to display the same, day or night, so to speak. When I turn the colors off, it still colorizes the rows alternately between two colors, like ledger paper.

when the colorizing is turned off, it is equally visible whether DarkMode is on or off.

I would love to be able to help, but these answers are vague and contradictory.
Sorry, without the project, I give up.

I added this project that duplicates the errors/bugs I’m seeing. It was working great for about a half hour and suddenly started to refuse showing text. The culprit is related to PaintCellBackground handle.

ListboxBug Project.zip (13.1 KB)

be carefil with custom colors.
if you paint a custom background color use also opposite foreground text color.
use If Color.IsDarkMode

you can add PaintCellText and use TextShape for output

at background paint event you need other color if the row is selected.

at windows 11 your example show data if i open this sql file. (Xojo 2025r2)

There is a routine that sets the defaultrowheight of the listboxes , and under some circumstances, it was setting the row height to 0
Data was there, but with a row height of zero, it couldn’t be seen.

2 Likes