Placeing Table in Edit Mode

General TRichView support forum. Please post your questions here
Post Reply
dc3_dcfl
Posts: 33
Joined: Sat Jan 30, 2010 12:45 am

Placeing Table in Edit Mode

Post by dc3_dcfl »

I am importing an .rtf doc using the rvActionOpen action into a DBRichViewEdit. The document is imported without errors, but the action does not place the table in edit mode. My dbaware post speedbutton is not enabled until I physically type in the DBRichViewEdit.

My attempt to add code (Table1.Edit) to the onclick event of the import button puts the table in edit mode, but then does not execute the richview action.

How do I do both, put the table in edit mode and execute the rvActionOpen richview action?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, TrvActionOpen does not put table in an edit mode. It is because it uses "viewer-style" methods (Clear and LoadRTF) that do not put table in an edit mode, unlike "editing-style methods".
See http://www.trichview.com/help/idh_examp ... edit1.html

I do not recommend to use TrvActionOpen, TrvActionNew, TrvActionSave and TrvActionSaveAs with TDBRichViewEdit.
The problem you described can be solved by called table.Edit and DBRichViewEdit.Change in TrvActionOpen.OnOpenFile. But all these actions were designed to work using association between the editor and the file, which makes no sense for a DB component.

I suggest using only TrvActionInsertFile and TrvActionExport.
dc3_dcfl
Posts: 33
Joined: Sat Jan 30, 2010 12:45 am

Post by dc3_dcfl »

Thanks again, problem solved.
Post Reply