Page 1 of 1

Without cursor table

Posted: Tue Jun 03, 2014 2:34 am
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.

Posted: Tue Jun 03, 2014 6:41 am
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);

Posted: Tue Jun 03, 2014 8:55 am
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