I’ve just realized that my Windows build of an existing app has started displaying non-existing cell lines in a canvas that is placed on top of the listbox with transparency enabled.
The Gridlines style is set to none for both in the ListBox, and the Labels in the Canvas rect are also set to transparent.
2022r2 and 2022r3.2
Windows app regardless of build platform.
Xojo Windows uses Direct2D which does not support transparency. In fact, when you set a control with transparency on, you get pseudo transparency, which mean the control background will show the color of the parent.
I do understand that, but where are the gridlines coming from?
I think that I may need to change the canvas to a container and embed it. The canvas and labels are only shown when the list is empty, so maybe even replace the listbox with just the canvas until a drop even occurs on that list … should not be this difficult.
Have you tried to set the ListBox as invisible ?
That’s what I always say but nobody listens to me.
That’s where I’m heading - hide the listbox and show the canvas and then swap the two when data is added to the listbox.
Quite a few of us do (and agree with you), unfortunately, none of us are in a position to reset the thinking at Xojo …
We’d all better listen to Beatrix!
To my own shame, I had long time given up to solve the problem with overlapping transparency in WIN, because I listened to the experienced masters who told, XOJO won’t do it since years.
Now my stone has fallen and the solution ist very simple:
Put your transparent Canvas not over the Listbox, but in the Listbox (or other objects) as a parent.
You get now the same result like MacOs and Linux presents.
Isn’t that logical?
Special greetings to Beatrix and Tim with thanks for the help in solving my thinking blockade.
It won’t make the canvas transparent anyway…
Very logical, and that is what I am doing - sorry, I should have mentioned that the ListBox is the parent of the Canvas. That’s what has me so curious about why the cell borders are being picked up in that instance since the gridlines are set to None in the ListBox settings.
Oh well, as previously mentioned, I’ve now made the Canvas the same size as the listbox, hide the listbox, and then swap them out when the user adds data to the listbox.