468,545 Members | 1,702 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,545 developers. It's quick & easy.

Adding large amounts of text to a readonly TextBox

What is the best way to add several pages of text to a readonly TextBox? The
text does not change and was created in a Word rtf document but could as
easly be put in a ASCII text file. Can this be done using a resource or
something? Can TextBoxes be attached to data sources other than database
objects?

Thanks,

Dennis
Nov 15 '05 #1
2 4893
Dennis,

You could put it into a resource, but ultimately, you have to get the
contents out of the resource into a string to add to the text. In order to
append large amounts of text, you will want to use the AppendText method on
the TextBox (or RichTextBox) class. It is meant to add large amounts of
text in an efficient manner.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:OF****************@TK2MSFTNGP10.phx.gbl...
What is the best way to add several pages of text to a readonly TextBox? The text does not change and was created in a Word rtf document but could as
easly be put in a ASCII text file. Can this be done using a resource or
something? Can TextBoxes be attached to data sources other than database
objects?

Thanks,

Dennis

Nov 15 '05 #2
Nicholas:

I had remembered talking to someone who mentioned using resouces to hold
literals, etc.

Now maybe you could point me in the right direction on how to do that. Is
there something in the MSDN docs that explains how to do this and then how
to get the text out after?

Thanks,

Dennis

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2******************@TK2MSFTNGP12.phx.gbl...
Dennis,

You could put it into a resource, but ultimately, you have to get the
contents out of the resource into a string to add to the text. In order to append large amounts of text, you will want to use the AppendText method on the TextBox (or RichTextBox) class. It is meant to add large amounts of
text in an efficient manner.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dennis C. Drumm" <de*******@primacode.com> wrote in message
news:OF****************@TK2MSFTNGP10.phx.gbl...
What is the best way to add several pages of text to a readonly TextBox?

The
text does not change and was created in a Word rtf document but could as
easly be put in a ASCII text file. Can this be done using a resource or
something? Can TextBoxes be attached to data sources other than database
objects?

Thanks,

Dennis


Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

58 posts views Thread by Jon Glazer | last post: by
1 post views Thread by DotNetJunkies User | last post: by
5 posts views Thread by Steven Smith | last post: by
6 posts views Thread by =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.