setting the size of the textbox correctly
This commit is contained in:
parent
58cb7f3d2d
commit
ea544e429e
8
debug.go
8
debug.go
|
@ -5,6 +5,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/awesome-gocui/gocui"
|
"github.com/awesome-gocui/gocui"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
@ -87,8 +88,13 @@ func (tk *guiWidget) dumpWidget(s string) {
|
||||||
curval := tk.String()
|
curval := tk.String()
|
||||||
if curval == "" {
|
if curval == "" {
|
||||||
curval = tk.node.GetLabel()
|
curval = tk.node.GetLabel()
|
||||||
|
curval = strings.TrimSpace(curval)
|
||||||
}
|
}
|
||||||
end = fmt.Sprintf("%-8s %-8s %s", tk.node.WidgetType, tk.cuiName, tk.String())
|
if curval == "" {
|
||||||
|
curval = tk.labelN
|
||||||
|
curval = strings.TrimSpace(curval)
|
||||||
|
}
|
||||||
|
end = fmt.Sprintf("%-8s %-8s %s", tk.node.WidgetType, tk.cuiName, curval)
|
||||||
}
|
}
|
||||||
log.Log(GOCUI, s1, s, end)
|
log.Log(GOCUI, s1, s, end)
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,6 +144,11 @@ func (tk *guiWidget) showTextbox() {
|
||||||
me.textbox.tk.Show()
|
me.textbox.tk.Show()
|
||||||
me.textbox.active = true
|
me.textbox.active = true
|
||||||
me.textbox.callerTK = tk
|
me.textbox.callerTK = tk
|
||||||
|
r := me.textbox.tk.gocuiSize
|
||||||
|
me.textbox.tk.full.w0 = r.w0
|
||||||
|
me.textbox.tk.full.w1 = r.w1
|
||||||
|
me.textbox.tk.full.h0 = r.h0
|
||||||
|
me.textbox.tk.full.h1 = r.h1
|
||||||
me.textbox.tk.dumpWidget("showTextbox()")
|
me.textbox.tk.dumpWidget("showTextbox()")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue