TableAddColumn()

Adds a column header to a table. The first column is created by Table(); use this for additional columns.

Syntax
Result = MaterialSB::TableAddColumn(Title.s, Table)
Parameters
Title.s The column header text.
Table The table element returned by Table().
Return Value

Returns the th (table header) element.

Remarks

Add all columns before adding rows with TableAddItem(). The number of columns should match the data you'll add to each row.

Example
Procedure Main(Success)
  If Success
    MaterialSB::Row(MaterialSB::#Grid_Container)
      MaterialSB::Col(12)
        ; Create table with first column
        myTable = MaterialSB::Table("Name", MaterialSB::#Table_Striped | MaterialSB::#Table_Highlight)
        
        ; Add additional columns
        MaterialSB::TableAddColumn("Email", myTable)
        MaterialSB::TableAddColumn("Role", myTable)
        MaterialSB::TableAddColumn("Status", myTable)
        
        ; Add data rows (values separated by newlines match columns)
        MaterialSB::TableAddItem("John Doe" + Chr(10) + "john@example.com" + Chr(10) + "Admin" + Chr(10) + "Active", myTable)
        MaterialSB::TableAddItem("Jane Smith" + Chr(10) + "jane@example.com" + Chr(10) + "Editor" + Chr(10) + "Active", myTable)
        MaterialSB::TableAddItem("Bob Johnson" + Chr(10) + "bob@example.com" + Chr(10) + "Viewer" + Chr(10) + "Inactive", myTable)
        
      MaterialSB::CloseCurrentParent()
    MaterialSB::CloseCurrentParent()
  EndIf
EndProcedure

MaterialSB::Download(@Main())
See Also

Table(), TableAddItem(), TableSetText()