html - Resize font in RichTextBox results in "Reference to a non-shared member requires an object reference" -
i trying re-size font in richtextbox activereports 7 report. code below selects text in richtextbox, when put breakpoint on line assigns new font selected text , hover mouse on selectionfont, says, "{name= reference non-shared member requires object reference. size= 10.0}." if step past breakpoint, next line of code (no matter is) give null reference exception. if comment out these re-sizing lines, report runs fine. doing wrong here, , how can fix problem font can re-sized?
code:
dim out string = rdr.item("directions").tostring().replace("<br />", "").replace(" <br>", "").replace(environment.newline, "<br />").replace("text-indent: 0px;", "").replace(" <p>", "<br />").replace("</p>", "") richtextbox1.html = out richtextbox1.selectionstart = 0 richtextbox1.selectionlength = richtextbox1.text.length richtextbox1.selectionfont = new system.drawing.font("arial", 9)
Comments
Post a Comment