February 2019
Intermediate to advanced
450 pages
11h 59m
English
The code to display the compose dialog should look very familiar by now. The window is created as gtk.WINDOW_TOPLEVEL because Go-GTK only allows a choice of top-level or popup (that is, floating content), rather than child windows such as a dialog. We set up a destroy function that will close the window rather than exiting the application.
The rest of the layout code is the usual vertical box for each item with a horizontal box for the to label, which is left of the input field:
func buildCompose() { window := gtk.NewWindow(gtk.WINDOW_TOPLEVEL) window.SetTitle("New GoMail") window.Connect("destroy", func() { window.Destroy() }) vbox := gtk.NewVBox(false, padding) subject := gtk.NewEntry() subject.SetText("subject") vbox.PackStart(subject, ...
Read now
Unlock full access