summaryrefslogtreecommitdiff
path: root/redo/control_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/control_windows.go')
-rw-r--r--redo/control_windows.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/redo/control_windows.go b/redo/control_windows.go
index a2c55e2..3fdec5d 100644
--- a/redo/control_windows.go
+++ b/redo/control_windows.go
@@ -9,6 +9,7 @@ type controlbase struct {
*controldefs
hwnd C.HWND
parent C.HWND // for Tab and Group
+ textlen C.LONG
}
type controlParent struct {
@@ -50,5 +51,7 @@ func (c *controlbase) text() string {
}
func (c *controlbase) setText(text string) {
- C.setWindowText(c.hwnd, toUTF16(text))
+ t := toUTF16(text)
+ C.setWindowText(c.hwnd, t)
+ c.textlen = C.controlTextLength(c.hwnd, t)
}