Esempio n. 1
0
func mainform_OnLoad(arg *gform.EventArg) {
	if dlg, ok := arg.Sender().(*gform.Dialog); ok {
		if ico, err := gform.NewIconFromResource(gform.GetAppInstance(), IDI_ICON1); err == nil {
			dlg.SetIcon(0, ico)
		}
	}
}
Esempio n. 2
0
func mainWindow_OnDropFiles(arg *gform.EventArg) {
	if e, ok := arg.Data().(*gform.DropFilesEventData); ok {
		println("File Count:", len(e.Files))
		println("Pos", e.X, e.Y)
		for _, f := range e.Files {
			println(f)
		}
	}
}
Esempio n. 3
0
func btnMsgBox_onclick(arg *gform.EventArg) {
	gform.MsgBox(arg.Sender().Parent(), "Message", "Test messagebox from gform", w32.MB_OK|w32.MB_ICONINFORMATION)
}
Esempio n. 4
0
func btnSaveFile_onclick(arg *gform.EventArg) {
	file, accepted := gform.ShowSaveFileDlg(arg.Sender().Parent(), "Test save file dialog", "", 0, "")
	if accepted {
		lb.SetCaption(file)
	}
}
Esempio n. 5
0
func btnBrowseFolder_onclick(arg *gform.EventArg) {
	folder, accepted := gform.ShowBrowseFolderDlg(arg.Sender().Parent(), "Test browse folder")
	if accepted {
		lb.SetCaption(folder)
	}
}