vb.net 2010 - Change the Bold properties -


i have problem in code:

if richtextbox1.font.bold = true     richtextbox1.font.bold = false else    richtextbox1.font.bold = true end if 

here problem:"richtextbox1.font.bold = false" (this property readonly), need help.

here's simple example:

private sub button1_click(sender system.object, e system.eventargs) handles button1.click     if richtextbox1.font.bold = true         richtextbox1.font = new font(richtextbox1.font, fontstyle.regular)     else         richtextbox1.font = new font(richtextbox1.font, fontstyle.bold)     end if end sub 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -