Edit me


import "fyne.io/fyne/v2/dialog"


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 (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

Since: 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) 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

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()