Border and background in textfield

I know this has been discussed before, and I have read most of the comments. Some of them are old and the discussions are closed so I’ll ask again:

I am developing a test web app now, but it appears to behave the same on a Windows desktop app. I haven’t tested on the Mac.

How do you make a text field transparent with no borders? Borderwidth and Borderthickness do not seem to work for text fields. Ditto for Transparent and BackgroundColor. They work for other objects just fine so I presume my syntax is okay.

I can set background and border to the color of the background (of the window or rectangle behind, but this seems less than optimum. I am using Xojo 2021 1.1 on Windows 10 Pro 19041.

For Web, this works as expected for me in the Opening event:

me.Style.Value( "background" ) = "transparent"
me.Style.Value( "border" ) = "0px"

Unfortunately you can’t remove the focus outline without custom CSS.

This isn’t, however, so easily accomplished for Desktop, especially Windows which lacks true transparency.

1 Like

Thank you, Mr. Cyphers. This worked spectacularly well, first time.
As you suggested, this does not work the same on Windows. It seems that form controls don’t share a lot of editable visual properties in general.

You’ve saved me an awful lot of time and effort so far. I haven’t seen that “style.value” syntax yet at all. Worthy of exploration just on its own.

1 Like

Happy to help! Don’t forget to mark a solution so it’s easy for others to find in the future.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.