diff options
| author | Jeff Carr <[email protected]> | 2024-02-03 19:28:19 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-03 19:28:19 -0600 |
| commit | fd56d89cc8f4cf3f839e831f7981fc15158d8800 (patch) | |
| tree | f78452fadf94910ca831f75f1ec2e69033bfba0c /view.go | |
| parent | 29d6cadbb391b3844a3bfcea910df03d06d5b443 (diff) | |
trying to debug SetText()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'view.go')
| -rw-r--r-- | view.go | 50 |
1 files changed, 1 insertions, 49 deletions
@@ -49,7 +49,6 @@ func (w *guiWidget) textResize() bool { } func (w *guiWidget) hideView() { - // w.SetVisible(false) w.deleteView() } @@ -62,59 +61,12 @@ func (w *guiWidget) showView() { } log.Log(INFO, "showView() labelN =", w.labelN) - /* - if w.hidden { - w.SetVisible(false) - return - } - */ - if w.v != nil { - return - } - w.recreateView() + /* w.textResize() w.v.Clear() fmt.Fprint(w.v, w.labelN) - /* - x0, y0, x1, y1, _ := me.baseGui.ViewPosition(w.cuiName) - // x0, y0, x1, y1, err := me.baseGui.ViewPosition(w.cuiName) - // log.Log(INFO, "showView() w.v already defined for widget", w.String(), x0, y0, x1, y1, err) - - // n.smartGocuiSize() - // changed := w.textResize() - - log.Log(INFO, "showView() Clear() and Fprint() here wId =", w.cuiName) - w.v.Clear() - fmt.Fprint(w.v, w.labelN) - log.Log(INFO, "showView() textResize() changed. Should recreateView here wId =", w.cuiName) */ - - /* - // if the gocui element has changed where it is supposed to be on the screen - // recreate it - if x0 != w.gocuiSize.w0 { - w.recreateView() - return - } - if y0 != w.gocuiSize.h0 { - log.Log(ERROR, "showView() start hight mismatch id=", w.cuiName, "gocui h vs computed h =", w.gocuiSize.h0, y0) - w.recreateView() - return - } - if x1 != w.gocuiSize.w1 { - log.Log(INFO, "showView() too wide", w.cuiName, "w,w", w.gocuiSize.w1, x1) - w.recreateView() - return - } - if y1 != w.gocuiSize.h1 { - log.Log(ERROR, "showView() too high", w.cuiName, "h,h", w.gocuiSize.h1, y1) - w.recreateView() - return - } - */ - - // w.SetVisible(true) } // create or recreate the gocui widget visible |
