| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Reference SharpPlot Class SharpPlot Properties SharpPlot Methods SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Class SharpLeaf Properties Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpLeaf Reference > SharpLeaf Methods > IncludeTable Method SharpLeaf.IncludeTable MethodFlow a table within current frame. The horizontal spacing around the included table is controlled by ParagraphStyle.HorizontalGap. Overloads
Exampletb = new Table(); tb.AddRows(new string[]{"","Column 1","Column 2","Column 3"}); tb.AddColumns(new string[]{"Row 1","Row 2","Row 3","Row 4"}); tb.AddRows(new int[][]{new int[]{101,201,301},new int[]{102,202,302},new int[]{103, 203,303},new int[]{104,204,304}}); // Force the fit to frame width lf.IncludeTable(tb,BoxFlow.Paragraph,-1,true); Target WidthPositive values are absolute sizes in points, negative values are proportions of the current frame width. Default is -1 for available frame width. The table will size relative columns (see negative values in Table.SetColumnWidths) so that the whole table width is no less than the target width. The table may end up wider than the target width if fixed-sized columns (including auto-fit) take up too much width for relative-sized columns to observe Table.SetColumnMinWidths. The table may end up narrower or wider than the target width if there are no relative-sized columns (target width doesn’t affect the column width at that point). A target width of 0 will therefore force all relative-sized columns to take their minimum allowed width. Fit WidthFlag to force the table to fit the target width – and blocks of columns to fit the block width, possibly scaling the table up or down. Default is false. Block WidthPositive values are absolute sizes in points, negative values are proportions of the current frame width. Default is -1 for available frame width. Maximum width at which to chop blocks of columns. Determines the eventual number of blocks of columns. Blocks will generally be slightly shorter due to the fact that effective column widths do not generally add up to block width exactly. A typical degenerate case is a 3-column table with column widths of {50,-1,50} with a targetwidth of 200 and a block width of 100: the middle column must be of size 100, and blocks can not be even. Blocks may be wider if retained columns take up too much space (see Table.SetTitles and Table.SetColumnRetain) A block width of 0 forbids the splitting of columns into blocks. Scaling factorArbitrary scaling factor to apply on table before computing the widths and heights. Default is 1. See also ...Table Tutorials | Splitting Blocks of Columns | SharpLeaf Members |