diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-01 19:27:12 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-01 19:27:12 -0400 |
| commit | e2b8fb81d64499b9a27b72b0cbb0c37f60e49c25 (patch) | |
| tree | 3143a71b55753201a9bdab741d4fbe74d858aea5 | |
| parent | 6e78eb94bab6469b39162f3afcfef083d4e9b281 (diff) | |
Converted direct usages of C.setWindowText() in the Windows Control code into calls to the equivalent Control methods so the text length can be properly stored.
| -rw-r--r-- | redo/basicctrls_windows.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redo/basicctrls_windows.go b/redo/basicctrls_windows.go index 1099a19..5c77085 100644 --- a/redo/basicctrls_windows.go +++ b/redo/basicctrls_windows.go @@ -20,7 +20,7 @@ func startNewButton(text string, style C.DWORD) *button { c := newControl(buttonclass, style | C.WS_TABSTOP, 0) - C.setWindowText(c.hwnd, toUTF16(text)) + c.setText(text) C.controlSetControlFont(c.hwnd) b := &button{ controlbase: c, @@ -138,7 +138,7 @@ func finishNewLabel(text string, standalone bool) *label { // controls are vertically aligned to the top by default (thanks Xeek in irc.freenode.net/#winapi) C.SS_NOPREFIX | C.SS_LEFTNOWORDWRAP, 0) - C.setWindowText(c.hwnd, toUTF16(text)) + c.setText(text) C.controlSetControlFont(c.hwnd) l := &label{ controlbase: c, |
