Page 1 of 1
Print out text only of insertet components
Posted: Tue Aug 08, 2006 8:23 am
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
Posted: Tue Aug 08, 2006 10:08 am
by Sergey Tkachenko
Probably, you can delete these text before viewing/printing?
Posted: Tue Aug 08, 2006 3:51 pm
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
Thank again
Posted: Tue Aug 08, 2006 4:19 pm
by Sergey Tkachenko
Please send 2 screen shots to me by e-mail (
[email protected] ):
1) how it should look like in editing mode
2) how it should look like in viewing mode
Posted: Fri Aug 11, 2006 7:21 pm
by Sergey Tkachenko
I received your e-mail and created a demo on your request:
http://www.trichview.com/forums/viewtopic.php?p=4053
Posted: Mon Aug 14, 2006 8:23 am
by Kern
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
Posted: Mon Aug 14, 2006 8:55 am
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.
Posted: Tue Aug 15, 2006 7:00 am
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