golang walk获取剪切板里面的文件路径

Shadow-Liu · · 3263 次点击
``` package main import ( "log" "strings" "github.com/lxn/walk" . "github.com/lxn/walk/declarative" ) type MyMainWindow struct { *walk.MainWindow textEdit *walk.TextEdit } func main() { mw := new(MyMainWindow) if err := (MainWindow{ AssignTo: &mw.MainWindow, Title: "Walk DropFiles Example", MinSize: Size{320, 300}, Layout: VBox{MarginsZero: true}, Children: []Widget{ TextEdit{ ReadOnly: true, Text: "No drop files...", }, TextEdit{ AssignTo: &mw.textEdit, ReadOnly: true, Text: "Drop files here, from windows explorer...", }, }, }.Create()); err != nil { log.Fatal(err) } mw.textEdit.DropFiles().Attach(func(files []string) { mw.textEdit.SetText(strings.Join(files, "\r\n")) }) mw.Run() } ```
#5
更多评论
![39.png](http://studygolang.qiniudn.com/170621/d78e87639487ab048c839c9f1ebd7d3e.png)
#1
walk 这个项目作者还维护吗?
#2