toga icon indicating copy to clipboard operation
toga copied to clipboard

Dialogs customization

Open PrakashFilippoBasso opened this issue 1 year ago • 2 comments

What is the problem or limitation you are having?

I need a second custom button in a Dialog, for example, in "About" I may need the "Okay", but also the "Copy" button, so that I can easily copy some version-related infos in a simple way... Or, anyway, it's normal to have buttons in Dialogues, more than one, with custom labels/actions.

Describe the solution you'd like

make a Custom Dialog, where you can add buttons with labels and actions

Describe alternatives you've considered

creating a window...? not so clean

Additional context

No response

PrakashFilippoBasso avatar Dec 08 '24 09:12 PrakashFilippoBasso

Related:

  • #2896

HalfWhitt avatar Dec 08 '24 15:12 HalfWhitt

Thanks for the suggestion. Regarding the specific use case you've described, it's worth noting that an About dialog isn't "just a dialog" - platforms have specialised subclasses for managing "About" content.

Even "normal" dialogs have very specific platform guidelines for how options should be displayed. In addition, the UX guidelines for most platforms advise away from the use of dialogs as a UI mechanism, as they are "blocking" behaviors. I don't know the specifics of your case, but it may be worth interrogating whether a dialog (and the About dialog specifically) is the right solution.

That said - while Toga should aim to provide good "out of the box" solutions for common use cases, there will always be edge cases, so an API for completely custom dialogs is a use case we should allow. Toga's own StackTraceDialog can likely serve as a the starting point of an implementation - StackTraceDialog is effectively a custom dialog, but without the "custom" part (the panel of content and the button choices) being exposed as public API.

freakboy3742 avatar Dec 09 '24 00:12 freakboy3742