Fyne API "dialog.ConfirmDialog"
dialog.ConfirmDialog
import "fyne.io/fyne/v2/dialog"
Usage
type ConfirmDialog
type ConfirmDialog struct {
}
ConfirmDialog is like the standard Dialog but with an additional confirmation button
func NewConfirm
func NewConfirm(title, message string, callback func(bool), parent fyne.Window) *ConfirmDialog
NewConfirm creates a dialog over the specified window for user confirmation. The title is used for the dialog window and message is the content. The callback is executed when the user decides. After creation you should call Show().
func NewCustomConfirm
func NewCustomConfirm(title, confirm, dismiss string, content fyne.CanvasObject,
callback func(bool), parent fyne.Window) *ConfirmDialog
NewCustomConfirm creates and returns a dialog over the specified application using custom content. The cancel button will have the dismiss text set and the “OK” will use the confirm text. The response callback is called on user action. The MinSize() of the CanvasObject passed will be used to set the size of the window.
func (ConfirmDialog) Hide
func (d ConfirmDialog) Hide()
func (ConfirmDialog) MinSize
func (d ConfirmDialog) MinSize() fyne.Size
MinSize returns the size that this dialog should not shrink below
2.1
func (ConfirmDialog) Refresh
func (d ConfirmDialog) Refresh()
func (ConfirmDialog) Resize
func (d ConfirmDialog) Resize(size fyne.Size)
Resize dialog, call this function after dialog show
func (*ConfirmDialog) SetConfirmImportance
func (d *ConfirmDialog) SetConfirmImportance(importance widget.Importance)
SetConfirmImportance sets the importance level of the confirm button.
Since 2.4
func (*ConfirmDialog) SetConfirmText
func (d *ConfirmDialog) SetConfirmText(label string)
SetConfirmText allows custom text to be set in the confirmation button
func (ConfirmDialog) SetDismissText
func (d ConfirmDialog) SetDismissText(label string)
SetDismissText allows custom text to be set in the dismiss button This is a no-op for dialogs without dismiss buttons.
func (ConfirmDialog) SetOnClosed
func (d ConfirmDialog) SetOnClosed(closed func())
SetOnClosed allows to set a callback function that is called when the dialog is closed
func (ConfirmDialog) Show
func (d ConfirmDialog) Show()