TextField BackColor not working OSX Xojo2018r3

Just updated to Xojo2018r3 and finding transparent TextFields on OSX which should have a white BackColor in my projects. Setting the BackColor in the IDE doesn’t work. (still using OSX 10.11)

This sounds like it could be a bug with the changes to coloring involved with Dark Mode.

As an immediate workaround, set the back color to just a smidge off white. I do not know if the transparency setting works, so try something like FEFEFE. If this works, that kind of confirms it’s a dark mode color change bug.

File a bug report and include everything
OS version
Xojo version
Sample project
Screenshots of transparent control

Do you have Border = OFF on those TextFields?

Edit: after some tests:

  • changing Transparency will not have any effect
  • changing Border to ON will display the white background
  • using FFFFFE as “white” will show the background even if Border = OFF

[quote=411352:@Alberto De Poo]Do you have Border = OFF on those TextFields?

Edit: after some tests:

  • changing Transparency will not have any effect
  • changing Border to ON will display the white background
  • using FFFFFE as “white” will show the background even if Border = OFF[/quote]

I am using Border = OFF, but for me switching it to ON didn’t change anything. Before posting about it I tried switching all options with no effect. But I didn’t try the “off-white” background as it makes sense as it sometimes is a workaround when “white = transparent”, and I should have tried that first. It does work.

This still seems like a bug though.

You can find more info about this in my blog post

https://blog.xojo.com/2018/10/23/following-the-dark-path/

Weird, a simple test with a TextField over a Red square I get completely transparent with white background and Border OFF, if I change Border to ON it display the white background.

[quote=411360:@Greg O’Lone]You can find more info about this in my blog post

https://blog.xojo.com/2018/10/23/following-the-dark-path/[/quote]

Thanks, Greg. Good to know, and that is a helpful post. However, it doesn’t exactly explain why this control is behaving this way. I also notice TextAreas (not TextFields) do not behave this way.

I see now running in DebugBuild then switching the border has an effect, but it doesn’t have any effect just alone in the IDE editor, the control remains transparent regardless of the Border property switch position.

Aaron, are you saying that the TextField in the IDE is transparent always and when you Run (debug) it changes to white/transparent depending on the Border switch position?

For me:

  • IDE always show white background
  • Running Border ON = white background
  • Running Border OFF = no background/transparent

Yes, I think this is not the expected behavior. Running in Mojave light mode, letters are black and no background, changing to dark mode, letters are white still no background.

Is nice to see a TextField with no background, but that should be controlled with some switch.

If I select white background and black letters I expect that on light mode (and dark mode if I set Support Dark Mode to OFF), if I have Support Dark Mode ON, I expect my TextField with black letters and white background to change to white letters and black background on dark mode.

Well If I make a new project, then add a TextField the Border property defaults to ON and the control is white. If I then toggle the Border property OFF in the IDE nothing happens. It does actually toggle between transparent and white backgrounds, but it does not update immediately in the layout Editor, I have to switch out of the layout editor into the code editor and then back, to see the change. (The editor has behaved that way for a long time, not updating the appearances of things until we do this switch out and back, that is a different bug, just slightly annoying and nothing new.)

Aaaron, thank you, you are correct, switching to code editor and back I can see changing the background from white to no-background, by changing the Border ON/OFF.

<https://xojo.com/issue/53833>

Aaron, I read your workaround, just did a test with Support Dark Mode ON (default value), if you use the workaround and then your app is used on Mojave Dark Mode, the background will stay “almost white” and the black letters will be white.

Because Dark Mode is new maybe the default should be OFF, that way only developers that know and want to support Mojave Dark Mode can change it to ON.

Something to keep in mind…

Just about all native controls should be translucent on Mojave’s Dark Mode by default. If they’re not, it’s a bug and will get fixed.

Apple has clearly stated that Dark Mode will not be optional in the future and that the OS will ignore the plist entry. You should be planning for dark mode in all new macOS projects.

Added Feedback Case #53833 to my favorites.
May I suggest a modification to the title of this post? Something like: TextField Border = OFF not working OSX Xojo2018r3?
Just to increase the rating and have a speedy fix.
Thanks for the workaround.

Here we go again … oh, but the MacBook Air is even thinner. :S