[Mono-winforms-list] rtftextbox, xml and imageload questions

Paul paul at all-the-johnsons.co.uk
Sun Aug 30 19:41:37 EDT 2009


Hi,

I'm in the final stages now of writing a piece of software for my
students and just need to put in the help files. As it's quite a
scientific piece (it's for my Chemistry students), I've decided to use
an RTF TextBox gadget and create using OpenOffice the helpfiles (saved
out as rtf).

I've added them to my project (I'm using MD 2.0), but getting them to
work is a pain!

How do I load an rtf file from the global namespace into the gadget?

I currently have 

helptext.Loadfile(global::molarity.Properties.Resources.ratio,
RichTextBoxStreamType.RichText);

am I doing this correctly and will the output include the formatting
using different fonts etc from the source RTF?

Next two are related. I have an XML file with a load of periodic table
data in. I click on a label, it fires off the click event. I've a search
routine which loads the correct data and puts it into some other labels.
Only problem is the associated image isn't loaded.

I have a picture box defined (call it element). What I have in the XML
file is the global::molarity.Property.Resources.imagename for the image
associated with the element in question. Unfortunately, when I try to
load the image, the software dies as it's claiming the image doesn't
exit.

I've run a debugger through the code and the string returned when
reading the xml line is correct (for example hydrogen returns
global::molarity.Properties.Resources.Hydrogen which corresponds to the
file Hydrogen.jpg in the Resources directory). Should I be using
element.LoadImage() to load the image followed by an invalidate()? or
should it be done another way?

TTFN

Paul

-- 
Sie können mich aufreizen und wirklich heiß machen!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20090831/669551c1/attachment.bin 


More information about the Mono-winforms-list mailing list