Page 1 of 2

Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:08 pm
by raugert
When a line is selected in a scrolling text field, the text color becomes transparent on Windows, which makes it hard to read. The text color remains ok on Mac. Is there something I need to do for PC platform.
PC Version.png
PC Version.png (6.2 KiB) Viewed 6255 times
Mac Version.png
test field hilite.zip
(4.89 KiB) Downloaded 174 times

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:11 pm
by richmond62
By "PC" do you mean a computer running a variety of Windows or a variety of Linux?

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:15 pm
by raugert
Sorry should have been more clear, Running Windows 10 on PC

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:15 pm
by Klaus
Not transparent but white! 8)
This is intended behavior and also happens on my Mac.
macOS 10.14.6, LC 9.6.4
Bildschirmfoto 2021-11-19 um 18.12.58.jpg
What OS version and LC version are you using?

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:18 pm
by raugert
Using Livecode Indy 9.6.4 on MacOS BigSur 11.5.2

Mine stays Black on Mac which I prefer.

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:19 pm
by richmond62
Yuck.png
Yuck.png (6.2 KiB) Viewed 6243 times
-
I think ALL you need to do is change your "textSelected" colour to something that gives you a better
contrast with the white text.

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:20 pm
by Klaus
Oh, then this is definitively a bug!
It should be white since the underlying OS also uses this behavior, see screenshot from FINDER.
Bildschirmfoto 2021-11-19 um 18.19.27.jpg

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:28 pm
by raugert
I've selected Black Text in the field which stays Black on Mac but becomes white on Windows. I would have expected the same behaviour ?
Screen Shot 2021-11-19 at 11.25.39 AM.png

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 6:36 pm
by Klaus
Hm, looks this only happens if you set any of these color properties!
Then this also happens here on my Mac.

I did not set anything in my first example, so in that case the default text color is black
and the hilitecolor is inherited from the underlying OS.

No idea why this happens on Windows?
Maybe THAT is the bug?

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Fri Nov 19, 2021 7:38 pm
by richmond62
the hilitecolor is inherited from the underlying OS
One way round this might be to explicitly set the hiliteColor in the field.

One thing that I also notice (on MacOS 12) is that, when hilited, text in a line in a listField
does go either white or transparent.
-
SShot 2021-11-19 at 20.44.33.png
-
I wonder about explicitly setting the textColor . . .

certainly with MacOS that "does the trick":
-
SShot 2021-11-19 at 20.46.36.png
-
I am attaching my stack here, and if some one could either confirm that it works, or that
it doesn't, in Windows . . .

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Sat Nov 20, 2021 6:21 am
by raugert
Indeed when the textColor is explicitly set to Black in the field properties, the Mac version does respect the textColor. In the Windows version it doesn't respect the textColor. It automatically change the textColor to white

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Sat Nov 20, 2021 6:37 pm
by jacque
That's been a problem on Windows for years. The only solution I've found is to set the hilitecolor to something that provides more contrast. You can play with it, sometimes setting it to a very light color retains the black text, but usually you need a darker color so the white text can be seen.

The behavior is due to Windows trying to be helpful.

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Sat Nov 20, 2021 6:56 pm
by richmond62
The behavior is due to Windows trying to be helpful.
Does that mean there is no way to "jump the system" on Windows?

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Sat Nov 20, 2021 7:04 pm
by jacque
richmond62 wrote:
Sat Nov 20, 2021 6:56 pm
Does that mean there is no way to "jump the system" on Windows?
Just the hilitecolor, that I know of.

Re: Hilited Text in scrolling field becomes transparent on PC

Posted: Sat Nov 20, 2021 7:08 pm
by richmond62
On Windows is the hiliteColor really white, or is it transparent as the OP stated?

If it were transparent one could layer a coloured rectangle behind it.

Looking back at their screenshot I have a feeling it is only transparent in so far as it allows the backgroundColor of
the listField to show through . . .