trichview.support
Re: Some questions |
Author |
Message |
Sergey Tkachenko |
Posted: 03/14/2004 15:31:21 > 1) Is it possible, to load the RVF File into memory and replace some text ? > i need to write some Text like "This is a test and this is a > &VariableFilledOnCreate& this is only a && " > Converting the Text into "This is a test and this is a thisWasTheVar this > is only a & " > and this without any component (No Search and Replace form the component, > because i don't like to show the Text, only load, change and save it) > The &VariableFilledOnCreate& can be with different Font Settings > all other images, object ... should be not changed. The only way to do it is to load document in invisible TRichView and process it. It's not necessary to use built-in search functions, there are more efficient ways. I just posted in trichview.support.example information about 4 trichview mail-merge demos. May be you can use one of them as a base. All of them show the result, but all field processing is performed before displaying. None of these demos search for fields by special text value (like text between &). They use either tags (invisible text associated with visible text), or text of the specified style, of special item type. In all of them field is a separate item. But if this is unacceptable, I can create a demo with fields between & or other characters. > > 2) Is it possible to implement user defined function > I would like to integerate some function in the text, which are calced > at runtime ? > The resulting text can have one or more lines and should be formatted > a) Insert a Object / Controll which generates an Event (OnPaint) every > time it is displayed ... > b) Insert a Object / Controll which text is changed everytime the > variable itself is changed. If field value is one line of text, the simplest solution is using label-item (see the 4th mail-merge demo) or a class inherited from it. If field value is a picture (may be displaying multiline text, but within its rectangular area) you can use your own control. If field value is a real multiline text, you cannot use these solutions. Use the 2nd or 3rd mail-merge demo as a base. But these demos remove the original field from the document and insert field value in its place. So, when field value is changed, you need to reload the document with fields and to perform mail-merge again. > > 3) Is it possible to extract only the text very quick for a search of many > documents ? > (or maybe is there allready a UDF for Interbase/Firebird to search in a > BLOB of TRichView Data ?) Load document in TRichView (may be invisible one) and use SaveText or SaveTextToStream. Do not call Format method (it is required for preparing document for displaying), and this procedure will be fast. |
Powered by ABC Amber Outlook Express Converter