vtables.Matrix(1, 1).LoadLayout("vetable")
'
'add tables to the toolbar
vetable.ParentComponent = tables
vetable.AddDivider
vetable.AddNew
vetable.AddDivider
vetable.AddClearSort
vetable.AddDivider
vetable.AddFilter("primary--text")
vetable.AddDivider
vetable.AddClearFilter
vetable.AddDivider
vetable.AddPDF
vetable.AddDivider
vetable.AddExcel
'
' add columns with headings
vetable.AddColumn1("name", "Dessert (100g Serving", vetable.COLUMN_TEXT, 0, True, vetable.ALIGN_LEFT)
vetable.AddChip("calories", "Calories", "item.color")
vetable.AddColumn("fat", "Fat (g)")
vetable.AddColumn("carbs", "Carbs (g)")
vetable.AddColumn("protein", "Protein")
vetable.AddColumn("iron", "Iron (%)")
vetable.AddAction("mashy", "Mashy", "mdi-vuetify")
vetable.SetFilterable(Array("name", "calories"))
'add action buttons
vetable.AddEdit
vetable.AddDelete
vetable.AddClone
vetable.AddPrint
vetable.AddSave
vetable.AddCancel
vetable.AddDownload
vetable.AddMenuV
'specify properties of the action buttons
vetable.SetIconDimensions("edit", "", vuetify.COLOR_GREEN)
vetable.SetIconDimensions("delete", "", vuetify.COLOR_RED)
vetable.SetIconDimensions("clone", "", vuetify.COLOR_AMBER)
vetable.SetIconDimensions("print", "", vuetify.COLOR_BLUE)
vetable.SetIconDimensions("save", "", vuetify.COLOR_BLUEGREY)
vetable.SetIconDimensions("cancel", "", vuetify.COLOR_BROWN)
vetable.SetIconDimensions("download", "", vuetify.COLOR_CYAN)
vetable.SetIconDimensions("menu", "", vuetify.COLOR_INDIGO)
vetable.SetIconDimensions("mashy", "", vuetify.COLOR_DEEPPURPLE)
'add data
vetable.AddRow(CreateMap("name": "Frozen Yogurt", "calories": 159, "color":"green", "fat": 6.0, "carbs": 24, "protein": 4.0, "iron": "1%"))
vetable.AddRow(CreateMap("name": "Ice cream sandwich", "calories": 237, "color":"orange", "fat": 9.0, "carbs": 37, "protein": 4.3, "iron": "1%"))
vetable.AddRow(CreateMap("name": "Eclair", "calories": 262, "color":"orange", "fat": 16.0, "carbs": 23, "protein": 6.0, "iron": "7%"))
vetable.AddRow(CreateMap("name": "Cupcake", "calories": 305, "color":"orange", "fat": 3.7, "carbs": 67, "protein": 4.3, "iron": "8%"))
vetable.AddRow(CreateMap("name": "Gingerbread", "calories": 356, "color":"orange", "fat": 16.0, "carbs": 49, "protein": 3.9, "iron": "16%"))
'
'vetable.SetColumnTotal("calories", "sumfield('calories')")
'vetable.SetColumnAttr("calories", ":color", "getcolor(item.calories)")
'vetable.SetColumnAttr("calories", ":color", "item.color")
tables.BindVueTable(vetable)