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.
Without cursor table
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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:
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);
-
- Posts: 2
- Joined: Tue Jun 03, 2014 2:08 am
Thank you for your answer, my question is no cursor click the cell, but can enter the contentSergey 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);