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)
}
TableConfig does all the configuration for a new Table 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()
}