Without cursor table

General TRichView support forum. Please post your questions here
Post Reply
lzr_xytx823
Posts: 2
Joined: Tue Jun 03, 2014 2:08 am

Without cursor table

Post by lzr_xytx823 »

TRichViewEdit insert table, but after insertion form no cursor¡£
For example:
TRVTableItemInfo *table = new TRVTableItemInfo(2 ,2 , rve_->RVData);
table->Color = Graphics::clNone;
table->CellBorderStyle = rvtbColor;
table->CellBorderWidth = 3;
table->CellVSpacing = -1;
table->CellHSpacing = -1;
table->BorderVSpacing = 0;
table->BorderHSpacing = 0;

table->CellBorderColor = 65535;

for (int r = 0; r<table->Rows->Count; r++)
for (int c = 0; c<table->Rows->Items[r]->Count; c++)
table->Cells[r][c]->BestWidth = 50;

bool a = rve_->InsertItem("", table);

Any ideas? Thanks.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The caret is positoned to the right of the inserted table.
To move it to the first cell, add the line at the end of your code:

Code: Select all

if (a)
  table->EditCell(0,0);
lzr_xytx823
Posts: 2
Joined: Tue Jun 03, 2014 2:08 am

Post by lzr_xytx823 »

Sergey Tkachenko wrote:The caret is positoned to the right of the inserted table.
To move it to the first cell, add the line at the end of your code:

Code: Select all

if (a)
  table->EditCell(0,0);
Thank you for your answer, my question is no cursor click the cell, but can enter the content
Post Reply