(text string)
| 62 | } |
| 63 | |
| 64 | func (se *SyntaxEdit) SetText(text string) (err error) { |
| 65 | if text == se.Text() { |
| 66 | return nil |
| 67 | } |
| 68 | text = strings.Replace(text, "\n", "\r\n", -1) |
| 69 | if win.TRUE != se.SendMessage(win.WM_SETTEXT, 0, uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text)))) { |
| 70 | err = errors.New("WM_SETTEXT failed") |
| 71 | } |
| 72 | return |
| 73 | } |
| 74 | |
| 75 | func (se *SyntaxEdit) TextChanged() *walk.Event { |
| 76 | return se.textChangedPublisher.Event() |
no test coverage detected