Listening to stream changes

K

Keith Patrick

I am ultimately trying to do a real-time bind of sorts between a
MemoryStream to a TextBox such that as data is written to my stream, the
textbox remains up-to-date. There is some behinds-the-scenes data mgmt I
want to do, so I will ultimately have some intermediate class, but the
trouble I am hitting is how to determine when data is written to the stream.
Streams have no events, so I was wondering if there is some
generally-accepted means of doing this.
 
K

Keith Patrick

Nm...found a solution I like better: subclass MemoryStream into
TextBoxStream and just override Flush(). The additional processing of the
box (mainly overflow logic) will go in the TextChanged event of the TextBox
itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top