# Multiple choice dialog

**URL:** <https://discourse.slicer.org/t/multiple-choice-dialog/13006>\
**Category:** Development\
**Created:** [August 14, 2020, 8:20pm UTC](https://discourse.slicer.org/t/multiple-choice-dialog/13006 "2020-08-14T20:20:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohan\_n](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rohan_n/32/78474_2.png) [@rohan\_n](https://discourse.slicer.org/u/rohan_n)\
**Post date:** [August 14, 2020, 8:20pm UTC](https://discourse.slicer.org/t/multiple-choice-dialog/13006/1 "2020-08-14T20:20:08Z")

</div>

Does slicer have any method that’s very similar to the  
`slicer.util.` `confirmYesNoDisplay`  
but instead of being just Yes or No, you can add custom number of buttons and give the buttons any labels you want? If so, syntax and example of how it’s used would be really helpful.  
Thanks,  
Rohan Nadkarni

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 14, 2020, 8:35pm UTC](https://discourse.slicer.org/t/multiple-choice-dialog/13006/2 "2020-08-14T20:35:22Z")

</div>

If Slicer doesn’t have exactly what you need, then usually it’s easy to make something custom with QDialog. If you think there’s a general purpose feature that would be good to add to slicer.util a PR would be welcome.

[https://doc.qt.io/qt-5/qdialog.html](https://doc.qt.io/qt-5/qdialog.html)

> <https://github.com/Slicer/Slicer/blob/e4557d1f5ebeb96e5577f46d8ad89cce3601ace2/Base/Python/slicer/util.py#L1966-L1974>

---

<div class="post-metadata">

**Author:** ![rohan\_n](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rohan_n/32/78474_2.png) [@rohan\_n](https://discourse.slicer.org/u/rohan_n)\
**Post date:** [August 14, 2020, 8:42pm UTC](https://discourse.slicer.org/t/multiple-choice-dialog/13006/3 "2020-08-14T20:42:57Z")

</div>

Ok, I’ll try that out

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 15, 2020, 3:51am UTC](https://discourse.slicer.org/t/multiple-choice-dialog/13006/4 "2020-08-15T03:51:35Z")

</div>

[QMessageBox](https://doc.qt.io/qt-5/qmessagebox.html) has many options, you can define custom buttons, too. You can search for QMessageBox and ctkMessageBox in .py files in Slicer source code to see examples.
