Print out text only of insertet components

General TRichView support forum. Please post your questions here
Post Reply
Kern
Posts: 25
Joined: Mon Aug 07, 2006 3:49 pm

Print out text only of insertet components

Post by Kern »

Hi all

I have placed some components in a TDBRichViewEdit.
In the edit mode i need to write some text before and after these components (eg. TGroupBox and TComboBox) and it should be possible to click and edit the components content. But in the view and print mode it should show only the text of the selected group or the text of the edit field.

How can I do that?
Thanks
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Probably, you can delete these text before viewing/printing?
Kern
Posts: 25
Joined: Mon Aug 07, 2006 3:49 pm

Post by Kern »

Hi Sergey

Thanks for your answer!
Sergey Tkachenko wrote:Probably, you can delete these text before viewing/printing?
But how???

At the moment i have a TDBRichViewEdit for editing the text and placing some Delphi components. At another "corner" of the program the user can view (readonly) or print the content.
I've tried to add the text instead the control in the event OnControlNeeded, but this event does not appear in my DBRichView even the SaveControl option is set or not.

Where can i do this exchange temporarry (without writing back to database)? I need only a hint, not the full code :wink:


Thank again
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send 2 screen shots to me by e-mail ( svt@trichview.com ):
1) how it should look like in editing mode
2) how it should look like in viewing mode
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I received your e-mail and created a demo on your request:
http://www.trichview.com/forums/viewtopic.php?p=4053
Kern
Posts: 25
Joined: Mon Aug 07, 2006 3:49 pm

Post by Kern »

Sergey Tkachenko wrote:I received your e-mail and created a demo on your request:
http://www.trichview.com/forums/viewtopic.php?p=4053
Hi Sergey

Thank you for the demo. If we would like to do that in a inherited TDBRichViewEdit, is there an event? We tried to write a "onControlNeeded"-Event, but this event is never fired.
It is verry important, that the data is not written back into the database!

thanks
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Use OnLoadDocument event.
And better use TDBRichView, not TDBRichViewEdit.
TDBRichView cannot write in DB.
TDBRichViewEdit in read-only mode can be used too.

PS: OnRVFControlNeeded is called only if controls are not stored in RVF. This event occurs when loading RVF for each control "placeholder", you should create control in this event. This event cannot be used to replace controls with text.
Kern
Posts: 25
Joined: Mon Aug 07, 2006 3:49 pm

Post by Kern »

Sergey Tkachenko wrote:Use OnLoadDocument event.
And better use TDBRichView, not TDBRichViewEdit.
TDBRichView cannot write in DB.
TDBRichViewEdit in read-only mode can be used too......
Hi Sergey

Thank for your replies!!! All works fine!
A big compliment for your TRichView.


Patrik
Post Reply