rvitem to be exported as image
-
- Posts: 16
- Joined: Mon May 09, 2016 9:16 am
rvitem to be exported as image
Is there any way i can save the rvitem like TableItem into a image file?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 16
- Joined: Mon May 09, 2016 9:16 am
I am going to have a feature to allow user to create table styles, after setting up the table styles, i am thinking to generate a thumbnail of the table style and it will be shown in the list box when choosing styles to apply to table.
I am using the ToImage demo as example, but I am struggling to work out a fixed table size with 5x5 col rows. I want my thumbnail to be around the size of 50x60.
Any guidance?
Thanks.
I am using the ToImage demo as example, but I am struggling to work out a fixed table size with 5x5 col rows. I want my thumbnail to be around the size of 50x60.
Any guidance?
Thanks.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can assign BestWidth and BestHeight properties of cells.
Note that the total cell width = (CellBorderWidth + CellHPadding)* 2 + Cell.BestWidth.
TotalTableWidth = (BorderWidth + BorderHSpacing) * 2 + TotalCellWidth * ColCount + CellHSpacing * (ColCount - 1).
You can use this equation to calculate the proper BestWidth for the given TotalTableWidth.
Height is calculated similarly.
PS: for the width, you can also simply assign Table.BestWidth; but for the height, this calculation is necessary.
PPS: Include rvtoIgnoreContentWidth and rvtoIgnoreContentHeight in table.Options
Update: of course, ColCount must be used for horizontal size, not RowCount.
Note that the total cell width = (CellBorderWidth + CellHPadding)* 2 + Cell.BestWidth.
TotalTableWidth = (BorderWidth + BorderHSpacing) * 2 + TotalCellWidth * ColCount + CellHSpacing * (ColCount - 1).
You can use this equation to calculate the proper BestWidth for the given TotalTableWidth.
Height is calculated similarly.
PS: for the width, you can also simply assign Table.BestWidth; but for the height, this calculation is necessary.
PPS: Include rvtoIgnoreContentWidth and rvtoIgnoreContentHeight in table.Options
Update: of course, ColCount must be used for horizontal size, not RowCount.