Text Selection/Highlight Colour

ahmad_rmh

Member
Local time
Today, 22:11
Joined
Jun 26, 2022
Messages
243
How to change text selection colour from default black to other ones in form fields
 
in form design, ensure the properties window is open

select the control or controls you want to change.
On the property sheet select the format tab
select the Fore Color property and click on the 3dot rubicon, then choose your color
1658344673700.png
 
txtbox.Forecolor = vbRed

make sure the .backstyle is Normal, and not transparent. but not needed for Forecolor.
 
Ah - on re reading, think the OP may be talking about the highlighted text selected by using the mouse (the .seltext property). AKA the highlighted text in my attachment above

If that is the case, then that is not an access behaviour but a windows one and one that I don't believe can be changed But it is not a simple case of being black - it all depends on the backcolor. No idea what the relationship is other than perhaps something like 'the opposite color'. Note that if you set the back style to transparent, it will become solid/normal when the control has the focus. So you may need to set the form backcolor as well.
 
Not so far as I am aware - suggest Google your question and see what you can find
 
I want text colour black and selection/Highlight colour is another one.
 
you will need to experiment - I've told you how
 

Users who are viewing this thread

Back
Top Bottom