Ticket #29 (closed enhancement: wontfix)
scriptUI: Choice dialog with custom buttons
| Reported by: | jteh | Owned by: | jteh |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.6 |
| Component: | Core | Version: | trunk |
| Keywords: | Cc: | ||
| Blocking: | Blocked By: |
Description
There will probably be several uses for a dialog containing a list and several buttons. A links list is one example.
The current scriptUI code includes SingleChoiceDialog and LinksListDialog. It would make sense to abstract this code so that it can be used more generally and then sub-class to provide these dialogs.
For this new class:
- The constructor should take:
- title
- message
- choices: A list of choices
- defaultChoice :index of default choice
- buttons:
- A list of buttons to display
- Need some way of identifying which button was pressed
- Callbacks might be nice, but might be tricky to implement, as the GUI ExternalExecuteEvent can only take one callback. Also, might actually make coding harder
- Perhaps just return the index of the button that was pressed?
- Cancel button will be added in addition to these buttons
- How do we handle the case of just wanting a standard ButtonSizer with OK and Cancel buttons?
- Maybe an empty buttons list?
- defaultButton: Index of default button
- The default button will get an ID of ID_OK
- Callback will probably return (buttonIndex, selectedItemIndex, selectedItemText)
Change History
Note: See
TracTickets for help on using
tickets.

NVDA is supported by