Text cursor difficult to see on high definition display

Working on new editor enhancements?
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Text cursor difficult to see on high definition display

Post by Blue »

System : windows 11 x64

As the topic title says, the text cursor of the IDE (a single vertical line) is nearly invisible on a high definition screen. That's a major problem, as the user ends up spending quite a bit of time looking for that narrow vertical bar on the screen. And it's not correctable by the user since
1. the IDE preferences do not provide an option to fatten the cursor
2. the IDE is indifferent to the modifiable cursor width that Windows offers its user.

The following image may help to see the problem :

Image

The text cursor is that thin vertical line barely visible on line 101 of that screenshot.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: Text cursor difficult to see on high definition display

Post by AZJIO »

You can access Scintilla and set the caret width

Code: Select all

ScintillaHandle = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
SendMessage_(ScintillaHandle, #SCI_SETCARETWIDTH, 3, 0)
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: Text cursor difficult to see on high definition display

Post by BarryG »

Blue, what are all those extra toolbar icons in the IDE, and how did you get them there? I've never seen that before.
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: Text cursor difficult to see on high definition display

Post by AZJIO »

BarryG wrote: Sun Apr 23, 2023 6:47 am Blue, what are all those extra toolbar icons in the IDE, and how did you get them there? I've never seen that before.
viewtopic.php?p=581935#p581935
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: Text cursor difficult to see on high definition display

Post by BarryG »

Thanks! I totally forgot about it.
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Text cursor difficult to see on high definition display

Post by Blue »

BarryG wrote: Sun Apr 23, 2023 6:47 am Blue, what are all those extra toolbar icons in the IDE, and how did you get them there? I've never seen that before.
Hi BarryG.
They are shortcuts to some of the personalized tools in my Tools menu. They can easily be tied to icons via the preferences options.
If you’re not able to figure out how to make them work for you, let me know. I’ll send you a partial copy of my preferences file,
You’ll see how easy it is to implement them…
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Text cursor difficult to see on high definition display

Post by Blue »

AZJIO wrote: Sun Apr 23, 2023 6:27 am You can access Scintilla and set the caret width

Code: Select all

ScintillaHandle = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
SendMessage_(ScintillaHandle, #SCI_SETCARETWIDTH, 3, 0)
Great, AZJIO.
I’ll give it a try... if I can figure out how to do that ! As of now, i haven't a clue what to do with your suggestion.
And, if it works, I’ll travel wherever you are on this planet and buy you a beer, or a coffee or a tea, or whatever will please you !

An indiscreet question : where did you learn about these Scintilla commands ? God knows I’ve looked all over for something like this.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: Text cursor difficult to see on high definition display

Post by AZJIO »

Blue wrote: Sun Apr 23, 2023 9:38 pm I’ll give it a try... if I can figure out how to do that !
Compile and run as a tool. You can immediately change all sorts of settings, not just the width of the cursor.
How to run the tool along with the IDE? -> viewtopic.php?t=72884
Specify "Sourcecode loaded"
Blue wrote: Sun Apr 23, 2023 9:38 pm An indiscreet question : where did you learn about these Scintilla commands ?
https://www.scintilla.org/ScintillaDoc.html

examples of interaction with the IDE viewtopic.php?p=597781#p597781
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Text cursor difficult to see on high definition display

Post by Blue »

AZJIO wrote: Sun Apr 23, 2023 10:48 pm[...]
Compile and run as a tool. You can immediately change all sorts of settings, not just the width of the cursor.
How to run the tool along with the IDE? -> viewtopic.php?t=72884
Specify "Sourcecode loaded"
That's exactly what i did. After reading your suggested command, I went back to see how I had done it with previous tools. It eventually all came back to me. However, the change in the text cursor is barely noticeable. But i'll keep digging...


AZJIO wrote: Sun Apr 23, 2023 10:48 pm [...]
Blue wrote: Sun Apr 23, 2023 9:38 pm An indiscreet question : where did you learn about these Scintilla commands ?
https://www.scintilla.org/ScintillaDoc.html
Went there, read a bunch of stuff... and cried ! The level of technicalities that neeed to be mastered just to follow a simple topic is overwhelming.

But the fog in my brain may eventually clear up , who knows ???
So, thank you for pointing me in the right direction and for the very specific instructions.
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: Text cursor difficult to see on high definition display

Post by AZJIO »

Blue wrote: Mon Apr 24, 2023 12:39 am However, the change in the text cursor is barely noticeable

Code: Select all

ScintillaHandle = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
If ScintillaHandle
	SendMessage_(ScintillaHandle, #SCI_SETCARETWIDTH, 4, 0)
	SendMessage_(ScintillaHandle, #SCI_SETCARETFORE, $0000FF, 0)
EndIf
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Text cursor difficult to see on high definition display

Post by Blue »

As a follow-up to AZJIO's suggested code :

No magic result, but at least a minor impovement.
A look at the picture will say it better than many words...

Image

Instead of a gray 1-pixel caret, i get a dark 3-pixel caret (line 94 in the picture).
Not a big change, but better than nothing.
I tried various values, and the above is the best i can get with any value between 3 and 20.

Code: Select all

SendMessage_(ScintillaHandle, #SCI_SETCARETWIDTH, 16, 0)  ; 3-20 = all the same 
PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
User avatar
Blue
Addict
Addict
Posts: 966
Joined: Fri Oct 06, 2006 4:41 am
Location: Canada

Re: Text cursor difficult to see on high definition display

Post by Blue »

Blue wrote: Mon Apr 24, 2023 3:36 am As a follow-up to AZJIO's suggested code :

No magic result, but at least a minor impovement.
A look at the picture will say it better than many words...

BEFORE :
Image

AFTER :

Code: Select all

SendMessage_(ScintillaHandle, #SCI_SETCARETWIDTH, 16, 0)  ; 3-20 = all the same 
Image

Not a big change, but better than nothing. An improvement nonetheless.
Various values made no difference; the above is the best i can get with any value between 3 and 20.

PB Forums : Proof positive that 2 heads (or more...) are better than one :idea:
Post Reply