Page 1 of 1

Refreshing Richtextbox??

Posted: Wed Dec 19, 2012 10:38 am
by hungryhounduk
Hey Peeps

Long time me no see :)

I wonder if anyone can help me with a little problem i am encountering with an app i am making..

I have a Richtextbox which accepts text Input from a Textbox and i have the option to add images to the richtextbox as well as the text...

When i refresh the Richtextbox when testing the app and have text and image showing, it only refreshes the text and leaves out the Image? :shock:

So my question is = how can I refresh the Richtextbox and keep the Text and Image intact?

Any help will be most gratefull and i will reward those with credits for help (that works) :)

cheers

Chris

Re: Refreshing Richtextbox??

Posted: Wed Dec 19, 2012 10:44 am
by comathi
What do you use to refresh the TextBox? Is it simply Textbox.text=... ?

Re: Refreshing Richtextbox??

Posted: Wed Dec 19, 2012 10:55 am
by hungryhounduk
Hey Comathi
What do you use to refresh the TextBox? Is it simply Textbox.text=... ?
Code: Select all
"Name:  " & TextBox1.Text & "    " & vbCrLf & vbCrLf & _
That code above refreshes the textboxes in the the richtextbox

But the code i am using to refresh the page when the image and text in present is
Code: Select all
Richtextbox1.refresh()
Chris

Re: Refreshing Richtextbox??

Posted: Wed Dec 19, 2012 11:18 am
by comathi
If you're familiar with C#, this might help you: http://www.codeproject.com/Articles/454 ... xtBox-at-R

It explains how to insert both text and images programatically into a RichTextBox control.

Re: Refreshing Richtextbox??

Posted: Wed Dec 19, 2012 11:45 am
by Scottie1972
copy the text and image in the richtextbox control. as in copy and paste that way you will have a copy of the richtextbox.
just copy it to memory then at refresh() paste it back.
idk? it might work