Control the width of table columns programmatically

General TRichView support forum. Please post your questions here
Post Reply
Vitalii
Posts: 62
Joined: Sat Oct 20, 2018 2:55 pm

Control the width of table columns programmatically

Post by Vitalii »

Hi, I have a specific question about tables.

The editor has a TRVTableItemInfo table that contains TRVLabelItemInfo.

According to the program logic, I programmatically change TRVLabelItemInfo.Text twice. The first time, the width of the table columns automatically adapts to the wide text, which is normal. But when I change the text to a shorter one the second time, the width of the table columns remains large (automatic adjustment does not work). If I then edit something in the table with the cursor, the columns return to the correct sizes. How can I restore the width of the columns programmatically after the second change to TRVLabelItemInfo.Text?

All operations take place within TSRichViewEdit.CanUpdate := False .. True.
Post Reply