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.
This commit is contained in:
parent
6e78eb94ba
commit
e2b8fb81d6
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue