summaryrefslogtreecommitdiff
path: root/view.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-02 14:49:17 -0600
committerJeff Carr <[email protected]>2024-02-02 14:49:17 -0600
commitee0f84fd8ef5993a6c374c8ee4e22c837ca39d97 (patch)
tree6b3f2800ddeb92c32d08c537cf1b0c1692b4a166 /view.go
parent4800fe662002c1e0192614f60c179b6d46c43cae (diff)
finds the item chosen from the dropdown list
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'view.go')
-rw-r--r--view.go68
1 files changed, 34 insertions, 34 deletions
diff --git a/view.go b/view.go
index 67a1e11..0709a1c 100644
--- a/view.go
+++ b/view.go
@@ -63,10 +63,10 @@ func (w *guiWidget) showView() {
log.Log(INFO, "showView() labelN =", w.labelN)
/*
- if w.hidden {
- w.SetVisible(false)
- return
- }
+ if w.hidden {
+ w.SetVisible(false)
+ return
+ }
*/
if w.v != nil {
return
@@ -77,41 +77,41 @@ func (w *guiWidget) showView() {
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)
+ 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()
+ // 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)
+ 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
- }
+ // 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)