The program run ok.But when I test it,I found a new problem.
My operate steps is as below. 1)I input the content on the tag "eName15". http://www.cnblogs.com/mikalshao/gallery/image/95383.html 2)I click "save" button to save it to the "X_result". http://www.cnblogs.com ...
then I run my program. I click the buttons from the read ,button1,button2. At first, It's can switch successful. But I switch serval times,the error also be found.
procedure ChangeFieldValue(RVData: TCustomRVData; const s: String); var ParaNo, StyleNo, Tag: Integer; sl: TStringList; i, Cnt: Integer; begin sl := GetStringListFromString(s); if sl.Count<X_Arrcount then ...
As I understand, you modified GetFieldValue2 so that it adds '^' between lines.
To change 'eName5' to multiline text: 1) Read field value from database (s = '111^222^333') 2) Change '^' to #13#10 (s = '111'#13#10'222'#13#10'333) 3) Call: if GetFieldLocation2(rv.RVData, field, RVData, ItemNo ...
I'm meaning is that I hope when the user read the data again, the richview format as the user input before. (when the user input ,they perhaps user "enter" key auto create serval "eName" tags.)
I created these functions for you, but I HIGHLY recommend you to use one of demos from http://www.trichview.com/forums/viewtopic.php?t=8 as a basis, instead of these functions. Thank you for your reply.
I'm sorry I can't be blind to the demo.
Here's my meaning's sourcecode. 1.create the talbe ...
As I understand, you need to change text of the field.
1) Use the unit http://www.trichview.com/support/files/RVInsertItems.zip (the most probably, it will be included in the next versions of TRichView. This unit has the function RVInsertString allowing to insert a single line ...
I searched the two funcitons. I create my funcitons base on them.
The detail is as below.
procedure TForm1.bSaveClick(Sender: TObject); var s: String; begin s := trim(GetFieldValue2(srv.RichViewEdit, 'eName5')); showmessage('»бХпјЗВјЎѕ'+s+'Ўї±ЈґжіЙ№¦ЈЎ'); end;