2.5.4.1: MultipleChoiceDialog Linux Gtk2, unicode

The MultipleChoiceDialog seems not to function properly any more.
The last item is always selected and it is impossible to deselect items.
Also the demo of MultipleChoiceDialog. I am using SuSE 9.1, Python 2.3.3, wxPython, unicode, built from Source RPM, but everything else seems to work, so it is probably a bug?! Can anyone confirm it, please?
Kind regards
Christoph

Christoph Herzog wrote:

The MultipleChoiceDialog seems not to function properly any more.
The last item is always selected and it is impossible to deselect items.
Also the demo of MultipleChoiceDialog. I am using SuSE 9.1, Python 2.3.3, wxPython, unicode, built from Source RPM, but everything else seems to work, so it is probably a bug?! Can anyone confirm it, please?

I see the bug too but am not sure yet why it happens. You may want to try using wx.MultiChoiceDialog instead. (It didn't exist when wx.lib.dialogs.MultipleChoiceDialog was created.)

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Christoph Herzog wrote:

The MultipleChoiceDialog seems not to function properly any more.
The last item is always selected and it is impossible to deselect items.
Also the demo of MultipleChoiceDialog. I am using SuSE 9.1, Python 2.3.3, wxPython, unicode, built from Source RPM, but everything else seems to work, so it is probably a bug?! Can anyone confirm it, please?

I see the bug too but am not sure yet why it happens. You may want to try using wx.MultiChoiceDialog instead. (It didn't exist when wx.lib.dialogs.MultipleChoiceDialog was created.)

Unfortunately this shows much the same problems, only that not the last but the first item is selected when being called. But selected items cannot be deselected here as well.
The code example below is meant to demonstrate this.
Kind regards
Christoph

# code from here:
import wx
from wx.lib.dialogs import MultipleChoiceDialog

alist = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
py_mcd = "MultipleChoiceDialog"
cpp_mcd = "MultiChoiceDialog"

class MyTest(wx.Dialog):
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, 'test dialogs',)
        self.btn1 = wx.Button(self, 101, py_mcd)
        self.btn1.SetPosition((15,15))
        self.btn2 = wx.Button(self, 102, cpp_mcd)
        self.btn2.SetPosition((15,55))
               self.Bind(wx.EVT_BUTTON, self.OnMultipleChoiceDialog, self.btn1)
        self.Bind(wx.EVT_BUTTON, self.OnMultiChoiceDialog, self.btn2)

    def OnMultipleChoiceDialog(self, event):
        dlg1 = MultipleChoiceDialog(self, py_mcd, py_mcd, alist)
        res1 = dlg1.ShowModal()
        dlg1.Destroy()

    def OnMultiChoiceDialog(self, event):
        dlg2 = wx.MultiChoiceDialog(self, cpp_mcd, cpp_mcd, alist)
        res2 = dlg2.ShowModal()
        dlg2.Destroy()

···

#---------------------------------------------------------------------------

if __name__ == '__main__':
    app = wx.PySimpleApp()
    dlg = MyTest(None)
    dlg.ShowModal()
    dlg.Destroy()
    app.MainLoop()
#code until here
--

Christoph Herzog wrote:

Robin Dunn wrote:

Christoph Herzog wrote:

The MultipleChoiceDialog seems not to function properly any more.
The last item is always selected and it is impossible to deselect items.
Also the demo of MultipleChoiceDialog. I am using SuSE 9.1, Python 2.3.3, wxPython, unicode, built from Source RPM, but everything else seems to work, so it is probably a bug?! Can anyone confirm it, please?

I see the bug too but am not sure yet why it happens. You may want to try using wx.MultiChoiceDialog instead. (It didn't exist when wx.lib.dialogs.MultipleChoiceDialog was created.)

Unfortunately this shows much the same problems, only that not the last but the first item is selected when being called. But selected items cannot be deselected here as well.

Hold down the Ctrl key while clicking to deselect items.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!