func (tv *TableView) Config() {
	tv.Lay = gi.LayoutVert
	tv.SetProp("spacing", gi.StdDialogVSpaceUnits)
	config := kit.TypeAndNameList{}
	config.Add(gi.KiT_ToolBar, "toolbar")
	config.Add(gi.KiT_Frame, "frame")
	mods, updt := tv.ConfigChildren(config)
	tv.ConfigSliceGrid()
	tv.ConfigToolbar()
	if mods {
		tv.SetFullReRender()
		tv.UpdateEnd(updt)
	}
}
Config configures the view
package etview
import (
	"bytes"
	"encoding/csv"
	"fmt"
	"image"
	"log"
	"reflect"
	"strings"
	"github.com/emer/etable/etable"
	"github.com/emer/etable/etensor"
	"github.com/goki/gi/gi"
	"github.com/goki/gi/girl"
	"github.com/goki/gi/gist"
	"github.com/goki/gi/giv"
	"github.com/goki/gi/oswin"
	"github.com/goki/gi/oswin/cursor"
	"github.com/goki/gi/oswin/mimedata"
	"github.com/goki/gi/oswin/mouse"
	"github.com/goki/gi/units"
	"github.com/goki/ki/ints"
	"github.com/goki/ki/ki"
	"github.com/goki/ki/kit"
	"github.com/goki/mat32"
	"github.com/goki/pi/filecat"
)
type TableView struct {
	giv.SliceViewBase
	Table      *etable.IdxView     `desc:"the idx view of the table that we're a view of"`
	TsrDisp    TensorDisp          `desc:"overall display options for tensor display"`
	ColTsrDisp map[int]*TensorDisp `desc:"per column tensor display"`
	NCols      int                 `inactive:"+" desc:"number of columns in table (as of last update)"`
	SortIdx    int                 `desc:"current sort index"`
	SortDesc   bool                `desc:"whether current sort order is descending"`
}
var KiT_TableView = kit.Types.AddType(&TableView{}, TableViewProps)
func AddNewTableView(parent ki.Ki, name string) *TableView {
	return parent.AddNewChild(KiT_TableView, name).(*TableView)
}
var _ giv.SliceViewer = (*TableView)(nil)
func (tv *TableView) SetTable(et *etable.Table, tmpSave giv.ValueView) {
	if et == nil {
		return
	}
	tv.Table = etable.NewIdxView(et)
	tv.TmpSave = tmpSave
	tv.TableConfig()
}
func (tv *TableView) SetTableView(ix *etable.IdxView, tmpSave giv.ValueView) {
	if ix == nil {
		return
	}
	tv.Table = ix.Clone()  
	tv.TmpSave = tmpSave
	tv.TableConfig()
}
func (tv *TableView) TableConfig() {
	if op, has := tv.Table.Table.MetaData["read-only"]; has {
		if op == "+" || op == "true" {
			tv.SetInactive()
		} else {
			tv.ClearInactive()
		}
	}
	tv.ColTsrDisp = make(map[int]*TensorDisp)
	tv.TsrDisp.Defaults()
	tv.TsrDisp.BotRtSpace.Set(4, units.Px)
	if !tv.IsInactive() {
		tv.SelectedIdx = -1
	}
	tv.StartIdx = 0
	tv.SortIdx = -1
	tv.SortDesc = false
	updt := tv.UpdateStart()
	tv.ResetSelectedIdxs()
	tv.SelectMode = false
	tv.SetFullReRender()
	tv.ShowIndex = true
	if sidxp, err := tv.PropTry("index"); err == nil {
		tv.ShowIndex, _ = kit.ToBool(sidxp)
	}
	tv.InactKeyNav = true
	if siknp, err := tv.PropTry("inact-key-nav"); err == nil {
		tv.InactKeyNav, _ = kit.ToBool(siknp)
	}
	tv.Config()
	tv.UpdateEnd(updt)
}
var TableViewProps = ki.Props{
	"EnumType:Flag":    gi.KiT_NodeFlags,
	"background-color": &gi.Prefs.Colors.Background,
	"color":            &gi.Prefs.Colors.Font,
	"max-width":        -1,
	"max-height":       -1,
}
func (tv *TableView) UpdateTable() {
	if tv.Table != nil {
		tv.Table.Sequential()
		tv.SortIfNeeded()
	}
	tv.Update()
}
func (tv *TableView) SortIfNeeded() {
	if tv.SortIdx >= 0 {
		tv.Table.SortCol(tv.SortIdx, !tv.SortDesc)
	}
}
func (tv *TableView) IsConfiged() bool {
	if len(tv.Kids) == 0 {
		return false
	}
	sf := tv.SliceFrame()
	if len(sf.Kids) == 0 {
		return false
	}
	return true
}