Exemplo n.º 1
0
func createPage3(assistant *gtk3.Assistant) {
	label := gtk3.NewLabel("This is a confirmation page, press 'Apply' to apply changes")

	label.Show()
	assistant.AppendPage(label)
	assistant.SetPageType(label, gtk3.GtkAssistantPage.CONFIRM)
	assistant.SetPageComplete(label, true)
	assistant.SetPageTitle(label, "Confirmation")
}
Exemplo n.º 2
0
func createPage4(assistant *gtk3.Assistant) *gtk3.ProgressBar {
	progressBar := gtk3.NewProgressBar()
	progressBar.SetHalign(gtk3.GtkAlign.CENTER)
	progressBar.SetValign(gtk3.GtkAlign.CENTER)

	progressBar.Show()
	assistant.AppendPage(progressBar)
	assistant.SetPageType(progressBar, gtk3.GtkAssistantPage.PROGRESS)
	assistant.SetPageTitle(progressBar, "Applying changes")

	// this prevents assistant window from being closed while we're "busy" applying changes
	assistant.SetPageComplete(progressBar, false)
	return progressBar
}
Exemplo n.º 3
0
func createPage1(assistant *gtk3.Assistant) {
	box := gtk3.NewHBox(12)
	box.SetBorderWidth(12)

	label := gtk3.NewLabel("You must fill out this entry to continue")
	box.PackStart(label, false, false, 0)

	entry := gtk3.NewEntry()
	entry.SetActivatesDefault(true)
	box.PackStart(entry, true, true, 0)
	entry.Connect("changed", onEntryChanged, assistant)

	box.ShowAll()

	assistant.AppendPage(box)
	assistant.SetPageTitle(box, "Page 1")
	assistant.SetPageType(box, gtk3.GtkAssistantPage.INTRO)
}