11/22/2024 10:55:51 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
|
|
|
|
TRichEdit - Open file
Posted: 27 Mar 06 6:47 AM
|
fiogf49gjkf0d Hi,
does anyone knows, how I can load a file (RTF or TXT) into a RichEdit-Control. I have tried LoadFile and LoadFromFile, but both didn't work.
Thanks, Thomas |
|
|
|
Re: TRichEdit - Open file
Posted: 28 Mar 06 12:21 AM
|
otc albuterol substitute over the counter albuterol walgreens click here To my knowledge, there's no way to actually load a file. However, you can read an RTF file directly and write it to the RichEdit control as RichText.
Here's a sample:
Dim fso Dim stream Dim file file = "c:\somedir\myfile.rtf" Set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists(file) Then Set stream = fso.OpenTextFile(file, 1) RichEdit1.RichText = stream.ReadAll stream.Close Set stream = Nothing End If Set fso = Nothing
Get the idea? It does work. You'll still have all the RTF markup for the text so you'll retain colors, fonts, etc etc etc from the RTF and it will display correctly in the control (even though this is a bit of a workaround - it would be better for it to just include a method to load a doc).
-Ryan |
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|