RTF Text (OpenInsight 32-bit Specific)
At 04 FEB 2005 05:39:40AM Richard Channer wrote:
I noticed a similar post but seems there was no reply…
I have a window which displays RTF text, which worked OK in OI16 and in OI32 (v4.1.3) but on upgrading to OI7.0.1 the rtf text no longer displays as expected and all the rtf codes are shown as though it was a plain text box.
Is there something else I need to set to make an edit box display RTF in OI7?
Regards,
Rich
At 04 FEB 2005 12:33PM Roger Hall wrote:
Hi Rich,
Don already posted a response to this question on the WORKS board, but I will fill in some more of the details.
Instead of the EditBox control, we are using an OLE browser control,Control.OLE_DISCLAIMER", "OLE.Navigate2", Drive():"\html\blank.htm")
Statements to retrieve text...
To write text into control bodySend_Message(@Window:".OLE_DISCLAIMER", "OLE.Document.Open")Send_Message(@Window:".OLE_DISCLAIMER", "OLE.Document.Write", Text)Send_Message(@Window:".OLE_DISCLAIMER", "OLE.Document.Close")The HTML data was created by opening the original RTF document in Word and saving it as a Filtered Web Page. Then the data is edited to remove all HTML except that inside the BODY tags. I created a script to clean it up the way I wanted.
Hope this helps.
At 04 FEB 2005 12:49PM Roger Hall wrote:
Here is a working link to Don's previous post to this question.
At 14 FEB 2005 07:43AM Richard Channer wrote:
Hi Roger,
Thanks for your help - as it happens we have reverted back to OI4 for the moment due to other difficulties, but will certainly have another look at this one when we go back down the OI7 route…!
Many thanks,
Rich
At 23 FEB 2005 02:25PM Ray Chan wrote:
Roger,
Thanks for the tip on using the OLE web browser control.
We started playing with this. From OI, we are able to display data with the web browser using HTML code.
From within OI, we want to take the data in the web browser and print it. It would be nice if we could output it using OIPI. We're stuck on this at the moment.
Do you know, or have any suggestion for approaching this problem.
Any suggestions or comments from anyone would be welcome.
Thanks,
Ray Chan
At 23 FEB 2005 02:41PM Matt orrell wrote:
At 23 FEB 2005 02:44PM Matt Sorrell wrote:
Ray,
Once you are in the web browser control with HTML and script, you have several possibilities. Once, you could just use the browser print functionality, but that is rather limited.
Another is to have a "print" link or button on the page that calls a script. This script could instantiate an instance of Word or other word processing application and format the text to print or it could even possibly invoke an instance of the OI engine so that you can get at the OIPI.
Just food for thought as I don't get to play with OI right now :(
At 23 FEB 2005 03:44PM Ray Chan wrote:
Matt,
Thanks for the thought, but we're looking for a way to get directly to OIPI somehow.
Long term, it just seems that this is the easiest most direct route to printing. If we use "Word", then we have to assume that the user will have "Word" and that may not be the case.
At the present the output into the Web browser looks great. Now we need to just print it from within OI.
Hopefully, you'll get to play more with OI .
Any other thoughts out there?
Ray Chan
At 24 FEB 2005 03:12AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Ray,
There's usually something on a Windows PC that handlks RTF text, even if Word isn't installed (WordPad.exe IIRC). You could just use the ShellExecute() Windows API call to print your RTF file and whatever program is registered on the workstation will do it for you.
World Leaders in all things RevSoft
At 25 FEB 2005 01:43AM Donald Bakke wrote:
Ray,
Have you tried the TEXTRTF message for the OIPI yet?
At 25 FEB 2005 06:51PM Ray Chan wrote:
Don,
I don't know much about TextRTF. Will the Text RTF allow us to print from the OLE Browser.
That is, we have Basic+ code which generate HTML. This is sent to the OLE browser. The data is formatted in an invisible HTML table.
Can TextRTF print HTML without doing conversion from HTML to RTF?
Will TextRTF align the data as it was displayed in the OLE browser?
If you have to convert, what suggestions are guidelines are out there?
Here's an example of what we are looking at:
http://www.visitjesse.com/testoutput.html
Any comments or suggestions welcome.
Thanks,
Ray Chan
At 26 FEB 2005 12:05AM Donald Bakke wrote:
Ray,
I think I misunderstood what you are doing. Given the context of this thread, I assumed that you were taking RTF formatted text and wrapping them up in HTML code so you can use the browser control. What it sounds like you are saying is that you are only using HTML to create your display in the browser control. If that is the case, then TEXTRTF will not help you. I was merely suggesting it as a way to take the RTF formatted text and pass it to the OIPI.
At 26 FEB 2005 04:26PM Ray Chan wrote:
Don,
I guess we jumped into this thread because we found something from Roger Hall (SRP). There he talked about using the OLE Browswer to display data. We jumped in and started playing with OLE Browswer. Pretty neat. However, then we got to the point of "how are we going to output this?" To us the easiest thing would be if OI or OIPI could somehow take this HTML string and print it .
Do you or for that ANYONE out there have any easy solutions. I hate to throw out what we have done sofar because it's pretty cool, but we gotta print it somehow and ideally, it will look the same .
Thanks,
Ray
At 26 FEB 2005 08:18PM Donald Bakke wrote:
Ray,
I don't (at this point) know of any easy solutions in the way you are hoping. It sounds to me like you want something that just intuitively knows how to interpret your HTML and just print it. I wouldn't be surprised if Bob Carten has a magic rabbit he can pull out of a hat for this.
My only thought for now is to use the Document.Body.InnerHTML property to extract the content of the browser control and then write your own interpreter for OIPI display.
Not as easy as you had hoped, but shouldn't be too difficult.
At 26 FEB 2005 08:57PM Ray Chan wrote:
Don,
Okay thanks for the response. I was afraid of that. That is, there isn't an easy way, but I wanted to check before proceeding since there is always a glimmer of hope that some "secret" is hiding from me due to my lack of knowledge.
As you know I'm pretty much committed to OI, but I still find that there is so much to learn and know what I don't know that I should know.
Hey again, I want to thank you for your OLEs they are really really super and make things more fun.
Ray
At 28 FEB 2005 05:35AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Ray,
If all you want to do is print what you see in the browser you can actually tap into same functionality that IE uses.
What you need to do is use the control's ExecWB method like so:
// Print HTML pageequ IDM_PRINT$ to 6call send_Message( @window : ".WEBBROWSER_CTRL", "OLE.ExecWB", IDM_PRINT$, 0 )// Print Preview HTML pageequ IDM_PRINTPREVIEW$ to 7call send_Message( @window : ".WEBBROWSER_CTRL", "OLE.ExecWB", IDM_PRINTPREVIEW$, "" )Regards
World Leaders in all things RevSoft
At 28 FEB 2005 09:33AM Ray Chan wrote:
Excellent!!! Sprezz rule!
We shall give this a try. Thank you so much for your help on this.
Ray Chan