selection display in Editorgadget in Windows
- a_carignan
- User
- Posts: 98
- Joined: Sat Feb 21, 2009 2:01 am
- Location: Canada
selection display in Editorgadget in Windows
Good morning,
Is there an easy way to change the text selection display in Editorgadget in Windows?
Is there an easy way to change the text selection display in Editorgadget in Windows?
Re: selection display in Editorgadget in Windows
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...
Except on this sentence...
Re: selection display in Editorgadget in Windows
A quick example:
Code: Select all
If OpenWindow(0, 0, 0, 322, 200, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget(0, 8, 8, 306, 133,#PB_Editor_WordWrap)
SetGadgetText(0,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."+
" Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."+
" Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
ButtonGadget(1, 8, 160, 306, 20, "Change text")
SendMessage_(GadgetID(0), #EM_SETSEL, 28, 39)
Repeat
If WaitWindowEvent()=#PB_Event_Gadget And EventGadget()=1 And EventType()=#PB_EventType_LeftClick
SendMessage_(GadgetID(0), #EM_SETSEL, 28, 39)
SendMessage_(GadgetID(0), #EM_REPLACESEL, 0, @"New text")
EndIf
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
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...
Except on this sentence...
- a_carignan
- User
- Posts: 98
- Joined: Sat Feb 21, 2009 2:01 am
- Location: Canada
Re: selection display in Editorgadget in Windows
Oops, I'm not talking about how to select text. I'm talking about how to change text highlighting when selected. Sorry for my mistake. 

Re: selection display in Editorgadget in Windows
Be more explicit. What do you want to change? Color, text (for this see my code), position, ?a_carignan wrote: change text highlighting when selected.
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...
Except on this sentence...
- a_carignan
- User
- Posts: 98
- Joined: Sat Feb 21, 2009 2:01 am
- Location: Canada
Re: selection display in Editorgadget in Windows
The color of the selection highlight box.
Re: selection display in Editorgadget in Windows
Box? What do you mean by box? Can you give a little code with comments?a_carignan wrote: The color of the selection highlight box.
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...
Except on this sentence...
- a_carignan
- User
- Posts: 98
- Joined: Sat Feb 21, 2009 2:01 am
- Location: Canada
Re: selection display in Editorgadget in Windows
I want to change the appearance of the text selection.
https://1drv.ms/i/s!Atmzt_kAwqmYtPAhj3p ... A?e=EGSPS4
https://1drv.ms/i/s!Atmzt_kAwqmYtPAhj3p ... A?e=EGSPS4
Re: selection display in Editorgadget in Windows
If I've understood correctly, it's a question of changing the background color used when selecting text.
However, I don't think this is only possible for a gadget. It's a system color. So changing this color will apply to the whole system.
However, I don't think this is only possible for a gadget. It's a system color. So changing this color will apply to the whole system.
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...
Except on this sentence...
- a_carignan
- User
- Posts: 98
- Joined: Sat Feb 21, 2009 2:01 am
- Location: Canada
Re: selection display in Editorgadget in Windows
Yes, that's right, I want to change the color of the selected text. Too bad it's not a gadget attribute.
THANKS 

