Added GridSlaves and fixed GridForget
Hi, (I could be wrong and not using GridForget correctly.) While converting my old Python ToDo app I needed the 'grid slaves' and 'grid forget' directives. I made Gridslave however I needed to fix GridForget to get it working. It's not the Window you need to pass but the widgets. tk.Row() and tk.Column() are a valid option for GridSlave().
func (me *App) deleteTask(r int) {
fmt.Println(me.inner_frame.GridSlaves())
tk.GridForget(me.inner_frame.GridSlaves(tk.Row(r)))
}
GridSlave:
func (w *Window) GridSlaves(option ...Opt) []string {
if option == nil {
return parseList(evalErr(fmt.Sprintf("grid slaves %v", w)))
}
return parseList(evalErr(fmt.Sprintf("grid slaves %v %s", w, collect(option...))))
}
GridForget:
func GridForget(widget []string) {
if len(widget) == 0 {
return
}
evalErr(fmt.Sprintf("grid forget %s", strings.Join(widget, " ")))
}
Edited by Complex_Signal2842