Click here to Skip to main content
15,848,451 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to change tables in WPF RichtextBox (add/remove rows/cols)

This is possible but only if first a cell of the related table is clicked.

So I can only make one change and then have to click on a table cell again.

My own trials do not work or compiles but gives error: Cannot set CaretPosition outside of RichTextBox.

What else can I do?

What I have tried:

C#
tab.RowGroups[0].Rows[0].Cells[0].Focus();
Rtb.CaretPosition = tab.RowGroups[0].Rows[0].Cells[0].ContentStart;
Posted
Comments
Gerry Schmitz 16-Mar-23 14:46pm    
Using an actual Grid / DataGrid might be more productive.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900