Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I customize the number of buttons under the dialog? #2127

Closed
smp12345 opened this issue Mar 29, 2021 · 6 comments
Closed

Can I customize the number of buttons under the dialog? #2127

smp12345 opened this issue Mar 29, 2021 · 6 comments
Assignees

Comments

@smp12345
Copy link

The default button under the dialog box is 2 or 1, one is OK and the other is cancel. Can I continue to increase the number of buttons?

	a := app.New()
	w := a.NewWindow("Hello")

	label := widget.NewLabel("Content")
	label.Alignment = fyne.TextAlignCenter
	dlg:=dialog.NewCustom("Title", "OK", label, w)
	dlg.Show()
	w.ShowAndRun()

button

@andydotxyz
Copy link
Member

The standard dialogs include a standard set of buttons.
We don't really have an API for adding additional buttons at this time, perhaps you can expand on this to indicate what sort of dialog would find this useful? Maybe we can add the functionality to the custom dialog type.

@smp12345
Copy link
Author

smp12345 commented Apr 4, 2021

I expect to be able to increase the number of custom Button interfaces, thanks. There are a lot of use scenarios, such as a user registration dialog box to increase the use of user registration, user login, password recovery and many other functions, but currently only button support callback function

@andydotxyz
Copy link
Member

Perhaps this issue could be re-worked as a feature request that shows how it could be presented?

It may be less trivial than suggested as the "extra" buttons may want to be visually separate from the "standard" ones, which may imply that central positioning is not right going forward...

@Jacalz Jacalz self-assigned this Jan 8, 2023
@Jacalz
Copy link
Member

Jacalz commented Jan 8, 2023

We have discussed improving custom dialogs. I will work on that feature and intend to do something about this at the same time.

@Jacalz
Copy link
Member

Jacalz commented Mar 5, 2023

I have opened #3703. Feel free to test and see if it suits your use cases.

@Jacalz Jacalz added this to the Dalwhinnie (May/June 2023) milestone Mar 31, 2023
@Jacalz
Copy link
Member

Jacalz commented Mar 31, 2023

I will close this as completed now that the PR has been merged into the develop branch.

@Jacalz Jacalz closed this as completed Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants