How Do You Programmatically Control the RTF Property in EditBox (OpenInsight 32-Bit)
At 06 NOV 2005 06:19:56PM Ray Chan wrote:
This may be something simple, but how does one control the text property within an EditBox to display for example, bold, underline, and/or italicor anything that RTF can do?
What is the PROPERTY that one uses to GET or SET the RTFtext property?
Thanks,
Ray Chan
At 06 NOV 2005 07:41PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
The TEXT property.
World leaders in all things RevSoft
At 07 NOV 2005 03:52AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Ray,
There's also the SETCHARFORMAT message to dynamically set font attributes at runtime.
World leaders in all things RevSoft
At 08 NOV 2005 03:21PM Ray Chan wrote:
Mr Sprezz:
There's also the SETCHARFORMAT message to dynamically set font attributes at runtime.
Thanks for the info on SetCharFormat. I think this will help.
Ray Chan
At 09 NOV 2005 09:37AM Richard Guise wrote:
I've tried this and it seems that one can SET the TEXT property with a load of text containing RTF format controls and it comes up properly formatted.
One can then use SETCHARFORMAT to change the RTF formatting.
However, when one GETs the TEXT property it comes back as plain text without the RTF formatting conntrols.
Has anyone found a way of GETting the text with the RTF controls? Without this capability it all seems to have rather limited value!
At 09 NOV 2005 11:47AM Jim Peters wrote:
Richard,
I think a workaround might be to maintain a copy of the original RTF string either in a variable or a UDP of the form.
Unless it has just been enhanced and I am unaware (possible!), I don't think you can edit RTF text with an EditBbox anyway. If you could keep a copy of whatever you put into it there would be no need to get it from the control.
I have contemplated making a user defined conversion that understood some simple HTML (or pseudo HTML if need be). Sort of like how many message boards such as this one work. There is always a way.
At 10 NOV 2005 05:37AM Richard Guise wrote:
Jim
Thanks for reply.
As my posting, I have edited RTF text in an edit box with "Rich Text Editor" checked using SetCharFormat via both screen menu items and context menu. It really works a treat.
I have received demo of RTF formatted text being fed into such an edit box using TEXT property.
However, if one tries to get at the results of one's editings by GETting the TEXT property, all one gets is plain unformatted text. Unless one can get at the edited text with the RTF controls for further usage, the ability to perform RTF editing seems to have very little, if any purpose.
Re your suggestion of storing the original text, how could one get at the edited text with all the RTF controls?
RTI, you're very silent on this one - any answers???
At 10 NOV 2005 07:09PM Jim Peters wrote:
Hi Richard,
This is what I remembered reading… from the 7.1.1 online help on properties of the Edit Box Control:
Rich Text Enables display of Lotus Notes rich text (RTF) data type. The "richness" in RTF data is only displayed in edit box controls. In addition, edit boxes with the Rich Text option turned on are display-only (no text may be entered).
So… it is documented that you cannot edit in an Edit Box when RTF is enabled, but it appears you are not prevented from trying.
You got me curious so I tried a few things on a test form. It does not seem to mind you editing existing RTF text and seems to respect any previous formatting as you insert or delete characters. The TEXT property just returns text though… in many cases this would be the desired behavior. Not all.
You are right, that kind of limits what you can do with it.
So close yet still so far!
![]()
At 11 NOV 2005 06:23AM Richard Guise wrote:
Thanks, Jim
It would be very very useful and is, as you say, so near and yet so far! I've also followed this up with WORKS support (who half promised it would be in 7.2) and they've now gone silent!
Great to find I don't seem to be missing something obvious.
If we can feed the RTF text via TEXT and edit/format it, it really cannot be a million miles away to be able to get it via TEXT or some other property, common variable or whatever. In my humble opinion it would be vastly more useful to spend a little time to complete this and make it really useful than all the time which must be used on lots of the fancy stuff which seems to be being added to OI.
Please, please, please, RTI!!!!!!!!!! Either tell us how we can do this or enable it in the product asap.
At 14 NOV 2005 07:35AM Mike Ruane wrote:
Richard-
I'll take a look at this.
Who in Works support half promised this to you?
Mike
At 15 NOV 2005 09:45AM Richard Guise wrote:
More than my life's worth!
However, the question still remains. May I put it the other way? What's the use of including the Rich Text Editor?
One can feed RTF into the edit box. One can edit the formatting. And then???
If we could then GET the RTF formatting/text it would be vastly useful. It must be lurking somewhere there and you've got the SET working - so is is really vastly difficult to implement GET and make it usable?
Sorry to be so demanding but I suppose if you've got a really good product, it unavoidably raises expectations!
At 15 NOV 2005 10:02AM Mike Ruane wrote:
How would the get be helpful? I only see this in some sort of editor or document management. Are you envisioning an application where users can make changes or create RTF in an editbox, and then that information is saved as is, or at least with its formatting flags?