trichview.com

trichview.support




Using a RVE MEMO SmartTag form


Return to index


Author

Message

Jim Maguire

Posted: 06/21/2005 5:44:22


I've got my smarttag form's working with field merging (including Blob

fields) and also now reading the form contents back in and storing to DB.

My problem is with smarttag Memo fields.


HOW CAN I JUST REPLACE THE FORM FIELD ITEM WITH THE RVF FROM THE smarttag

MEMO form?


I'm using the smarttag feature to get user data for each form field.  I've

used your example and have a separate form for numeric, calendar, and text

data.  My problem is that one of the fields on the form is a Notes field

that allows multiple line input.  All the other smart tag forms call a

Change... routine that turn off protection, replace the text and re-protect,

like this:


  RVStyle1.TextStyles[2].Protection :=

RVStyle1.TextStyles[2].Protection-[rvprModifyProtect];

  rve1.SetCurrentItemText(Value);

  RVStyle1.TextStyles[2].Protection :=

RVStyle1.TextStyles[2].Protection+[rvprModifyProtect];



Works fine.  My Smart Tag MemoForm contains a TRichViewEdit control where

user enters memo text.  When they click OK, it calls the ChangeMemo routine

in my editor.  I now just want to transfer the contents to the form field in

the Editor.


I think I'm over my head here because I can't just do a

SetCurrentItemText(Value) (unless there's a way to convert RVE to text?), so

I tried the following (RVEForm is my smart tag memo form containing rve1):


RVEForm.rve1.SaveRVFToStream(Stream, False);   //save memo form's rvf to

stream

Stream.Position := 0;


//I've saved the RVData and ItemIndex of the table cell containing the memo

form field:

FDestRVData.InsertRVFFromStream(Stream, ItemIndex, Dummy1, Dummy2, Dummy3,

False);


I tried following this with a format, but what I get is the entire field and

tag is replaced.


HOW CAN I JUST REPLACE THE FORM FIELD ITEM WITH THE RVF FROM THE smarttag

MEMO form?


Is it possible for you to enhance your smarttag merge example with a popup

that contains another RVE control?









Powered by ABC Amber Outlook Express Converter