Fyne API "dialog.ColorPickerDialog"
dialog.ColorPickerDialog
import "fyne.io/fyne/v2/dialog"
Usage
type ColorPickerDialog
type ColorPickerDialog struct {
Advanced bool
}
ColorPickerDialog is a simple dialog window that displays a color picker.
Since:
1.4
func NewColorPicker
func NewColorPicker(title, message string, callback func(c color.Color), parent fyne.Window) *ColorPickerDialog
NewColorPicker creates a color dialog and returns the handle. Using the returned type you should call Show() and then set its color through SetColor(). The callback is triggered when the user selects a color.
Since:
1.4
func (ColorPickerDialog) Hide
func (d ColorPickerDialog) Hide()
func (ColorPickerDialog) MinSize
func (d ColorPickerDialog) MinSize() fyne.Size
MinSize returns the size that this dialog should not shrink below
Since:
2.1
func (*ColorPickerDialog) Refresh
func (p *ColorPickerDialog) Refresh()
Refresh causes this dialog to be updated
func (ColorPickerDialog) Resize
func (d ColorPickerDialog) Resize(size fyne.Size)
Resize dialog, call this function after dialog show
func (*ColorPickerDialog) SetColor
func (p *ColorPickerDialog) SetColor(c color.Color)
SetColor updates the color of the color picker.
func (ColorPickerDialog) SetDismissText
func (d ColorPickerDialog) SetDismissText(label string)
SetDismissText allows custom text to be set in the dismiss button
func (ColorPickerDialog) SetOnClosed
func (d ColorPickerDialog) SetOnClosed(closed func())
SetOnClosed allows to set a callback function that is called when the dialog is closed
func (*ColorPickerDialog) Show
func (p *ColorPickerDialog) Show()
Show causes this dialog to be displayed