Page 1 of 1

Placeing Table in Edit Mode

Posted: Wed Feb 17, 2010 9:41 pm
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?

Posted: Thu Feb 18, 2010 9:53 am
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.

Posted: Thu Feb 18, 2010 2:57 pm
by dc3_dcfl
Thanks again, problem solved.