Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a bit of code for showing the font dialog, I have tried many different things to try and solve this question before asking. This is for a windows form application in vb.net

I would like to add the function of only changing the selected text whilst the rest of the text in the rich Text Box remains the same.

Your help is very much appreciated. (I’m sorry for all the questions,
I am a dyslexic and sometimes it take a bit of time for the proverbial penny to drop).

What I have tried:

VB
FontDialog1.ShowColor = True

FontDialog1.Font = EditBoxC.Font

If FontDialog1.ShowDialog <> Windows.Forms.DialogResult.Cancel Then
    EditBoxC.Font = FontDialog1.Font
Posted
Updated 3-Jul-23 23:59pm
v4
Comments
Richard MacCutchan 3-Jul-23 16:01pm    
Given all your questions on the use of the RichTextBox, I would suggest going through the documentation in detail.

1 solution

They hide that stuff in the documentation on the RichTextBox control. See the SelectionFont property[^].
 
Share this answer
 
Comments
Richard MacCutchan 3-Jul-23 16:00pm    
Someone, it seems, cares not for your answers. Maybe the idea of doing some work for themselves is irksome. :)
Dave Kreskowiak 3-Jul-23 18:04pm    
There's a certain somebody going around downvoting mine and Griff's.
Andre Oosthuizen 4-Jul-23 6:00am    
I agree with Richard's comment and also posted a link in another post from OP. This sio the correct answer so my +5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900