User's Guide > Drawings > Modifying Drawing Tables
Modifying Drawing Tables
Functions Introduced:
ProDwgtableRowAdd() and ProDwgtableColumnAdd() can add a row or a column before or after an existing row or column. The input arguments height_in_chars and width_in_chars specify the row height and column width in characters, respectively. Another input argument display specifies whether the updated table should be displayed. When making many changes to a table, it is advisable not to display them immediately, but to use ProDwgtableDisplay() to update the display later.
ProDwgtableRowDelete() and ProDwgtableColumnDelete() delete any specified row or column, including removing the text from the affected cells.
ProDwgtableColumnWidthSet() and ProDwgtableRowHeightSet() assign the width of a specified column and the height of a specified row, respectively, depending upon the size of the drawing table. The drawing table size given by the enumerated data type ProDwgtableSizetype can be of the following types:
PRODWGTABLESIZE_CHARACTERS—Specifies the size in characters. If the specified value for width of a column or height of a row is a fraction, PRODWGTABLESIZE_CHARACTERS rounds down the fractional value to the nearest whole number.
PRODWGTABLESIZE_SCREEN—Specifies the size in screen coordinates.
PRODWGTABLESIZE_CHARS_TRUE—Specifies the size in characters. It enables you to specify a fractional value for the width of a column and height of a row.
To accommodate a wrapped text in a table row, you can use the functions to automatically adjust the height of the row to accommodate the entire text content. The functions ProDwgtableRowheightAutoadjustGet() and ProDwgtableRowheightAutoadjustSet() get and set the automatic row height adjustment property for a row of a drawing table. These functions use the enumerated type ProDwgtableRowheightAutoadjusttype, which has the following values:
PRODWGTBLROWHEIGHT_AUTOADJUST_FALSE—Specifies that the automatic row height adjustment property is not set.
PRODWGTBLROWHEIGHT_AUTOADJUST_TRUE—Specifies that the automatic row height adjustment property is set.
PRODWGTBLROWHEIGHT_AUTOADJUST_TRUE_LEGACY—Specifies a pre- 1.0 release behavior. In this behavior, sometimes the row height may be automatically adjusting and sometimes may not be automatically adjusting. To set an explicit row adjustment status use the function ProDwgtableRowheightAutoadjustSet().
Note:
 
The value PRODWGTBLROWHEIGHT_AUTOADJUST_TRUE_LEGACY is not applicable to the function ProDwgtableRowheightAutoadjustSet().
When using the function ProDwgtableRowheightAutoadjustSet() any changes in the height of a row will be seen only after the next regeneration, or a call to the function ProDrawingTablesUpdate().
ProDwgtableCellsMerge() allows the merging of cells within a specified range of rows and columns, to form a single cell. The new cell can be addressed (for example, when using ProDwgtableTextEnter(), or other calls to ProDwgtableCellsMerge()) by the row and column number of the original top left cell. Rows below, and columns to the right, retain their original numbers. The function ProDwgtableCellsRemesh() unmerges all the merged cells in a specified range of rows and columns.
ProDwgtableCelltextWrap() wraps the text in a cell.
ProDwgtableSave() saves a drawing table in one of the formats listed below. The formats given by the enumerated type ProDwgtableFormattype can be of the following types:
PRODWGTABLEFORMAT_TBL—Specifies the tabular format.
PRODWGTABLEFORMAT_TXT—Specifies the text format.
PRODWGTABLEFORMAT_CSV—Specifies the CSV format.
ProDwgtableRotate() rotates a table 90 degrees clockwise.
ProDwgtableErase() erases a drawing table.
ProDwgtableDelete() deletes a drawing table.
Было ли это полезно?