Background color for word being searched

Post bugs related to the IDE here
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Background color for word being searched

Post by Blue »

Not sure this should be reported here as a bug, but since it's a major anoyance, I'll leave it here :

The background color in the editor (not within the search box!) for the word (or words) being searched gets changed to a very dark gray (or lighter black, your choice) making the underlying text almost invisible.

Image

I would think that is not by choice, but rather by omission : someone forgot to assign a clearer color...
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
Kurzer
Enthusiast
Enthusiast
Posts: 693
Joined: Sun Jun 11, 2006 12:07 am
Location: Near Hamburg

Re: Background color for word being searched

Post by Kurzer »

I think it is adjustable in the settings:

Settings/Editor/colours -> selection background

Did not tested it, but in my IDE the colour is changed. It is too long ago since I set up my IDE colors, so no warranty..
Maybe your entries are named diffenrent, because my IDE is german. but just check it out and test it.
PB 6.12 x64, OS: Win 11 24H2 x64, Desktopscaling: 150%, CPU: I7 12700 H, RAM: 32 GB, GPU: Intel(R) Iris(R) Xe Graphics | NVIDIA GeForce RTX 3070, User age in 2025: 57y
"Happiness is a pet." | "Never run a changing system!"
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Background color for word being searched

Post by Blue »

Kurzer wrote: Tue Sep 19, 2023 11:06 pm I think it is adjustable in the settings:

Settings/Editor/colours -> selection background

Did not tested it…
If it were modifiable, believe me, I would have found the solution…
I tested every possibility before posting this as an IDE bug.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
AZJIO
Addict
Addict
Posts: 2218
Joined: Sun May 14, 2017 1:48 am

Re: Background color for word being searched

Post by AZJIO »

Image
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Background color for word being searched

Post by Blue »

Thanks for answering, AZJIO ,
but please give me some credit for some intelligence.

The 'Selection Background' color is not the problem.
Read again, and very carefully, the problem as presented in my initial post.

Or follow the folowing steps, one at a time, without skipping any :

1. Select a word : it gets highlighted in your chosen 'Selection Backgound' color.
2. With that word still selected, press ^F. The Find dialog appears. (or press ^G. The Goto Line dialog appears)
3. The selected word disappears behind an almost black background. Notice how the repeated selections never change.
4. when you dismiss the dialog, the selected word reverts to the correct Selection Background.


And THAT is the unexpected problematic behaviour.
This happens when, basically, any Dialog Box appears while a word is highlighted.
But i haven't tested them all !

Proof : as can be seen in the pictures, the Selection Background color is yellow.

Pic 1 : A word gets selected. It is clearly and correctly highlighted in yellow.
Image

Pic 2 : a dialog box gets displayed. The selection turns very dark
Image

Is that clearer, AZJIO ?
Last edited by Blue on Wed Sep 20, 2023 5:35 am, edited 1 time in total.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: Background color for word being searched

Post by Kuron »

It might be best to not be so nasty to somebody who was trying to help you.

I know nothing about AZJIO, but keep in mind for most on these forums, English is a second or even a third language.
Best wishes to the PB community. Thank you for the memories. ♥️
Little John
Addict
Addict
Posts: 4802
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Background color for word being searched

Post by Little John »

Blue wrote: Not sure this should be reported here as a bug, but since it's a major anoyance, I'll leave it here :

The background color in the editor (not within the search box!) for the word (or words) being searched gets changed to a very dark gray (or lighter black, your choice) making the underlying text almost invisible.
I can confirm the problem (PB 6.03 beta 6 on Windows), and it's a major annoyance for me, too.
mestnyi
Addict
Addict
Posts: 1102
Joined: Mon Nov 25, 2013 6:41 am

Re: Background color for word being searched

Post by mestnyi »

Blue Sorry, can I have your colors? they are too interesting
PeDe
Enthusiast
Enthusiast
Posts: 303
Joined: Sun Nov 26, 2017 3:13 pm

Re: Background color for word being searched

Post by PeDe »

Just for your information, you can set the background color in the Scintilla gadget with e.g. the following values:

Code: Select all

ScintillaSendMessage(iScintillaNumber, #SCI_SETELEMENTCOLOUR, #SC_ELEMENT_SELECTION_INACTIVE_BACK, #RED)
There are #SC_ELEMENT_SELECTION_INACTIVE_TEXT and #SC_ELEMENT_SELECTION_INACTIVE_BACK as constants.

Peter
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: Background color for word being searched

Post by boddhi »

Hello Blue,

I can also confirm the situation.
It seems that since a few versions of 6.03bx, the IDE misbehave, as I also reported here.
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
VB6_to_PBx
Enthusiast
Enthusiast
Posts: 627
Joined: Mon May 09, 2011 9:36 am

Re: Background color for word being searched

Post by VB6_to_PBx »

i just tested my PureBasic Color choices in PureBasic 6.03 Beta 6 (x64)
and they look OK as far as the selected Text's FrontColor and BackColor
however, it might because i'm using a Black Colored background
Primary selected Text is White on Lite-Grey background

 

tested on PureBasic 6.03 Beta 6 (x64)
 
Image
Image
Image
Image
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison
AZJIO
Addict
Addict
Posts: 2218
Joined: Sun May 14, 2017 1:48 am

Re: Background color for word being searched

Post by AZJIO »

What if one of the plugins breaks the functionality?
I also checked the exe file taken from here and the problem was not confirmed.
Little John
Addict
Addict
Posts: 4802
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Background color for word being searched

Post by Little John »

AZJIO wrote: Wed Sep 20, 2023 12:12 pm What if one of the plugins breaks the functionality?
Little John wrote: Wed Sep 20, 2023 6:53 am I can confirm the problem (PB 6.03 beta 6 on Windows) [...]
... and I don't do any of the things that are done in the thread you linked.
User avatar
Blue
Addict
Addict
Posts: 972
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Background color for word being searched

Post by Blue »

I think that the problem is quite simply that the IDE reverts to the default Background value when it displays a dialog box, rather than sticking with the user's custom color.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
PeDe
Enthusiast
Enthusiast
Posts: 303
Joined: Sun Nov 26, 2017 3:13 pm

Re: Background color for word being searched

Post by PeDe »

With the code from yuki and this additional code, you can restore the colors of the selection for now:

Backspace key, delete indentation parts?
viewtopic.php?p=608726#p608726

Code: Select all

Define iColor.i
iColor = SendMessage_(scintillaHandle, #SCI_GETELEMENTCOLOUR, #SC_ELEMENT_SELECTION_TEXT, 0)
SendMessage_(scintillaHandle, #SCI_SETELEMENTCOLOUR, #SC_ELEMENT_SELECTION_INACTIVE_TEXT, iColor)
iColor = SendMessage_(scintillaHandle, #SCI_GETELEMENTCOLOUR, #SC_ELEMENT_SELECTION_BACK, 0)
SendMessage_(scintillaHandle, #SCI_SETELEMENTCOLOUR, #SC_ELEMENT_SELECTION_INACTIVE_BACK, iColor)
Peter
Post Reply