Selection Color (Text and Background) changed when losing focus?

Working on new editor enhancements?
Axolotl
Addict
Addict
Posts: 837
Joined: Wed Dec 31, 2008 3:36 pm

Selection Color (Text and Background) changed when losing focus?

Post by Axolotl »

Hi #PB_All

I have noticed a strange behavior with the selection colors on my system....
This is probably not only the case with PB 6.
Steps to reproduce:
1. Select a text in the editor (selection colors are as defined in File|Settings...|Coloring|Selection text and selection background)
2. Click on the corresponding tab (selection colors change to not/never defined ones... but highlighting is working now)

I have no idea if this is a bug or a feature.

Happy coding and stay healthy.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
fryquez
Enthusiast
Enthusiast
Posts: 391
Joined: Mon Dec 21, 2015 8:12 pm

Re: Selection Color (Text and Background) changed when losing focus?

Post by fryquez »

The new scintilla has this new "feature" to change the selection color if the window loses focus.

adding

Code: Select all

ScintillaSendMessage(Gadget, #SCI_SETELEMENTCOLOUR, #SC_ELEMENT_SELECTION_INACTIVE_BACK, Colors(#COLOR_Selection)\UserValue)
to ScintillaHighlighting.pb --> SetBackgroundColor() should change it back like it was before.
Axolotl
Addict
Addict
Posts: 837
Joined: Wed Dec 31, 2008 3:36 pm

Re: Selection Color (Text and Background) changed when losing focus?

Post by Axolotl »

Thanks fryquez,

I added that command in one of my IDE-Tools (with static color) and it worked very well for me.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Post Reply