forked from go/golangs_learn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
442 B
27 lines
442 B
3 years ago
|
package app
|
||
|
|
||
|
import (
|
||
|
"github.com/lxn/walk"
|
||
|
)
|
||
|
|
||
|
type TaskLog struct {
|
||
|
TextEdit *walk.TextEdit
|
||
|
}
|
||
|
|
||
|
func NewTasklog(textEdit *walk.TextEdit) *TaskLog {
|
||
|
task := new(TaskLog)
|
||
|
task.TextEdit = textEdit
|
||
|
return task
|
||
|
}
|
||
|
|
||
|
func (t *TaskLog) SetTextEdit(textEdit *walk.TextEdit) {
|
||
|
t.TextEdit = textEdit
|
||
|
}
|
||
|
|
||
|
func (t *TaskLog) AppendLogText(s string) {
|
||
|
t.TextEdit.AppendText(s + "\r\n")
|
||
|
}
|
||
|
|
||
|
func (t *TaskLog) ClearLogText() {
|
||
|
t.TextEdit.SetText("")
|
||
|
}
|