Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 22109

change font of one textbox

$
0
0
Hi, I am new in this forum and I know few the vb.
I use the vb6 and I have a question, I hope can help me.
In a toolbar I have inserted a combobox which choice the font;
While in a form there are many richtextboxes, they aren’t an array.
In the event click of the combobox I have inserted this code:
Code:

Form1.RichTextBox1.SelFontName = Combofont.List (Combofont.ListIndex)
so I change the text font of the richtextbox1.
If I insert this code too:
Code:

Form1.RichTextBox2.SelFontName = Combofont.List (Combofont.ListIndex)
Change the font of the richtexbox2 in the same time.
instead I would want to change the alone font of the richtextbox that is active, that has the focus, and not of all the others.
How can modify the code?
maybe is better to have an array of richtextbox?
Thanks in advance
best regards

Viewing all articles
Browse latest Browse all 22109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>