Listbox on Mac

In MacOS, the scrollbars on listboxes are transparent.
image

This deeply , deeply offends me , and I cannot explain why.
Is there any way to make the contents not draw under the scroll bars, or to make the scrollbars opaque?

I’m not seeing that on my machine. How is the content being drawn. I get … at the end of the line when the text is too long.

Are you drawing the text yourself?

ps. It offends me too :slight_smile:

I have a horizontal bar too.
Also 'orrible.

The listbox content is much wider than the listbox bounds.
And what you see is drawn in the CellTextPaint event as I need graphics in there.

You can turn off Transparent in the Inspector and it won’t run under the scroll bars.

Screen Shot 2022-07-29 at 12.48.04 PM
This is in Monterey, Xojo 2022 r2

I’m still not seeing it.

Transparent makes no difference, either way.

Are you drawing the contents yourself. If so have you looked into Graphics.Clip method.

Transparent seems to have sorted it! Cheers.
image

Alternatively I would highly recommend using NSTableView. The only way to make your app look like it should on macOS.
Here is a very good (and very usable) implementation made by Thomas Tempelmann.

2 Likes

This breaks cross platform compiling, surely?

Yes, but I thought it was about macOS?

Yes, but I thought it was about macOS?

It is, but as I also ship a Windows version (which didn’t have the same trouble), I can’t make use of NS… controls.
I expect the NS versions would look better.
What I would prefer is for Xojo to use NS controls when it builds on a Mac, and ordinary litsboxes when it builds on Windows, but we know that won’t happen.
I have a good enough solution.

1 Like

I would say macOS native. Something the Xojo Listbox is not and the sad thing is that your app does look old and awkward for macOS users. Xojo Inc should really look into this and make a real native listbox for both macOS and Windows.

2 Likes