HTML Display Component...

JaedenRuiner

Well-known member
Joined
Aug 13, 2007
Messages
340
Programming Experience
10+
Is there a Base Component that merely displays HTML in formatted mode. Basically a WebBrowser component but without the "Web Browsing", if you catch my drift.

I'm working on a display feature for the formatted emails that are being transmitted by my application, and they are HTML formatted. I could use a WebBrowser component, but it has so much overhead for browsing and all I need is the HTML display capabilities.
<edit>:
Additionally, I'd preferably like one that can be Databound. Basically, the body of my emails are stored in database table field. It'd be nice to have a HTML Viewer that I can directly associate with that field (column) and thus I could scroll through the list of emails and the same as a DGV or bound textbox, the data would just show up visual as parsed HTML.

Thanks
 
Last edited:
Would using WebBrowser control with AllowNavigation property set to False be something?
 
It looks that way. I was hoping to avoid some of the overhead the control uses. But in the end, i found i could DataBind the "DocumentText" property and i disable all the "browsing" features which seems to work well enough so far. it just is a rather in-depth component for such a simplistic use. *shrug*

Thanks
 
Well, that didn't seem to work either.

Basically, my Database has the "Body" of the email in HTML format. I want the WebBrowser (or comparable component) to have it's source input bound to the Body Element of my dataTable. I tried:
VB.NET:
Me.BodyBrowser.DataBindings.Add(New System.Windows.Forms.Binding("DocumentText", Me.bind_MailBox, "Body", True))

But that seemed to overwrite the data that was in my DataTable as opposed to setting the value in the Browsers.DocumentText property. Instead of "Reading" the data, it tried to "write" the data. Any Ideas?
(I really don't want to have to listen to each time the user changes records and manually set the Browser.)
<edit>
I did just that though. When My Primary Binding Source Changes Position, I have to profligate through all the other binding sources and such so everything is on the same page. Instead of using the DataBindings as above, I put in the line:
VB.NET:
BodyBrowser.DocumentText = bind_MailBox(bind_MailBox.Position)("Body")
And it works just fine. Any Ideas as to why that works and the DataBindings() method does not?

thanks
 
Last edited:
Back
Top