How delete the cursor of the table cells before the tag!

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
srvsxf
Posts: 27
Joined: Tue Sep 21, 2010 1:19 am

How delete the cursor of the table cells before the tag!

Post by srvsxf »

when I insert a tag in the table one cell.I find cursor before my tag.

How to delete it?

Please help me.

Thanks! Urgent !
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, I do not understand, what do you mean by "tag".
Please post your code for insertion here.
srvsxf
Posts: 27
Joined: Tue Sep 21, 2010 1:19 am

Post by srvsxf »

my sourcecode is as below:
//----------------((
procedure TForm1.FormCreate(Sender: TObject);
var r,c: Integer;
begin
table1 := TRVTableItemInfo.CreateEx(2,14, srv.RichViewEdit.RVData);
table1.BorderWidth := 0;
table1.CellBorderWidth := 0;
table1.CellBorderStyle := rvtbColor;
table1.CellBorderColor := clwhite;
table1.BorderStyle := rvtbColor;

with table1 do begin
Cells[0,12].AddNL('ГЕХпєЕ',0,0);
Cells[1,0].AddNL('РХГы',0,0);
Cells[1,2].AddNL('РФ±р',0,0);
Cells[1,4].AddNL('ДкБд',0,0);
Cells[1,6].AddNL('їЖ±р',0,0);
Cells[1,8].AddNL('ІЎКТ',0,0);
Cells[1,10].AddNL('ґІєЕ',0,0);
Cells[1,12].AddNL('ЧЎФєєЕ',0,0);

//----РґИлTag
Cells[0,13].AddNLTag('xxxx',6,0,Integer(StrNew('eName1')));
Cells[1,1].AddNLTag('xxx',6,0,Integer(StrNew('eName2')));
Cells[1,3].AddNLTag('x',6,0,Integer(StrNew('eName3')));
Cells[1,5].AddNLTag('xx',6,0,Integer(StrNew('eName4')));
Cells[1,7].AddNLTag('xxxx'+#13+'oooooopo',6,0,Integer(StrNew('eName5')));
Cells[1,9].AddNLTag('xx',6,0,Integer(StrNew('eName6')));
Cells[1,11].AddNLTag('xx',6,0,Integer(StrNew('eName7')));
Cells[1,13].AddNLTag('xxx',6,0,Integer(StrNew('eName8')));
end;
srv.RichViewEdit.InsertItem('', table1);
end;
//----------------))
when I run the program,It's as below.
http://www.cnblogs.com/mikalshao/galler ... 94404.html
I don't want the cursor place the word "the cursor" .I hope when I insert the tag only have the tag cursor.
if have the cursor ,the user can input some word in the place,but I can't get the value to write to the database.

Please help me .

Thanks[/img]
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Do you mean empty lines in the beginning of each cell?
Call Cell.Clear before adding items in this cell using Cell.AddNL or Cell.AddNLTag.
For each cell.

PS: the code

Code: Select all

Cells[1,7].AddNLTag('xxxx'+#13+'oooooopo',6,0,Integer(StrNew('eName5'))); 
is wrong. You cannot use #13 in the parameter of AddNLTag.
Use this code to add 2 lines:

Code: Select all

Cells[1,7].AddNLTag('xxxx',6,0,Integer(StrNew('eName5'))); 
Cells[1,7].AddNLTag('oooooopo',6,0,Integer(StrNew('eName5'))); 
srvsxf
Posts: 27
Joined: Tue Sep 21, 2010 1:19 am

Post by srvsxf »

Sergey Tkachenko.Thank you very much!

My this problem has solved.

Thanks a lot.
Post Reply