You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by jteh on 2008-02-12 09:37
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)
The text was updated successfully, but these errors were encountered:
Comment 1 by mdcurran on 2008-04-27 12:13
Do we still need this? as the Links list is already implemented. Was this going to be used for a System Tray list? if so I'd suggest making a ticket for that and making this block that.
Comment 2 by jteh on 2008-05-20 01:05
ON further reflection, this idea is probably overly complicated. It is probably easier to just make such dialogs for individual cases as required. This can be reopened if desired at a later point.
Changes:
Added labels: wontfix
State: closed
Reported by jteh on 2008-02-12 09:37
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 text was updated successfully, but these errors were encountered: