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

Usage

type CustomDialog

  type CustomDialog struct {
}
  

CustomDialog implements a custom dialog.

Since: 2.4

func NewCustom

  func NewCustom(title, dismiss string, content fyne.CanvasObject, parent fyne.Window) *CustomDialog
  

NewCustom creates and returns a dialog over the specified application using custom content. The button will have the dismiss text set. The MinSize() of the CanvasObject passed will be used to set the size of the window.

func NewCustomWithoutButtons

  func NewCustomWithoutButtons(title string, content fyne.CanvasObject, parent fyne.Window) *CustomDialog
  

NewCustomWithoutButtons creates a new custom dialog without any buttons. The MinSize() of the CanvasObject passed will be used to set the size of the window.

Since: 2.4

func (CustomDialog) Dismiss

  func (d CustomDialog) Dismiss()
  

func (CustomDialog) Hide

  func (d CustomDialog) Hide()
  

func (CustomDialog) MinSize

  func (d CustomDialog) MinSize() fyne.Size
  

MinSize returns the size that this dialog should not shrink below.

Since: 2.1

func (CustomDialog) Refresh

  func (d CustomDialog) Refresh()
  

func (CustomDialog) Resize

  func (d CustomDialog) Resize(size fyne.Size)
  

Resize dialog, call this function after dialog show

func (*CustomDialog) SetButtons

  func (d *CustomDialog) SetButtons(buttons []fyne.CanvasObject)
  

SetButtons sets the row of buttons at the bottom of the dialog. Passing an empty slice will result in a dialog with no buttons.

Since: 2.4

func (CustomDialog) SetDismissText

  func (d CustomDialog) 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 (*CustomDialog) SetIcon

  func (d *CustomDialog) SetIcon(icon fyne.Resource)
  

SetIcon sets an icon to be shown in the top right of the dialog. Passing a nil resource will remove the icon from the dialog.

Since: 2.6

func (CustomDialog) SetOnClosed

  func (d CustomDialog) SetOnClosed(closed func())
  

SetOnClosed allows to set a callback function that is called when the dialog is closed

func (CustomDialog) Show

  func (d CustomDialog) Show()