disable Dialog sound

Hi there,
here's my first message...please forgive my dumbness, I'm a new user
of Python and of OOp in general.

I created a scroll dialog, I would like to avoid that awful sound
occuring after destroying the dialog. Is that possible?
Thanks in advance.
I past here the code for the class DropDialog

class MyDropDialog(wx.Dialog):
    def __init__(self, list, *args, **kwds):
        # begin wxGlade: MyDialog.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_1 = wx.Panel(self, -1)
        self.label_1 = wx.StaticText(self.panel_1, -1, _("USERS"))
        self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=list,
style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)
        self.button_1 = wx.Button(self, wx.ID_OK, "")
        self.button_2 = wx.Button(self, wx.ID_CANCEL, "")
        #self.Bind(wx.EVT_BUTTON,self.OnButton,self.button_1)

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyDialog.__set_properties
        self.SetTitle(_("USER SELECTION"))
        self.SetSize((300, 150))
        self.label_1.SetFont(wx.Font(16, wx.DEFAULT, wx.NORMAL,
wx.BOLD, 0, ""))
        self.combo_box_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.combo_box_1.SetSelection(0)
        self.button_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.button_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
        self.button_1.SetDefault()
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyDialog.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_3 = wx.BoxSizer(wx.VERTICAL)
        sizer_3.Add(self.label_1, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
        sizer_3.Add(self.combo_box_1, 0, wx.TOP|
wx.ALIGN_CENTER_HORIZONTAL, 10)
        self.panel_1.SetSizer(sizer_3)
        sizer_1.Add(self.panel_1, 1, wx.ALIGN_CENTER_HORIZONTAL|
wx.ALIGN_CENTER_VERTICAL, 0)
        sizer_2.Add(self.button_1, 0, 0, 0)
        sizer_2.Add(self.button_2, 0, wx.LEFT, 10)
        sizer_1.Add(sizer_2, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5)
        self.SetSizer(sizer_1)
        self.Layout()

    def GetStringSelection(self):
        return self.combo_box_1.GetStringSelection()
    def GetSelection(self):
        return self.combo_box_1.GetSelection()

···

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,

···

On Apr 16, 11:45 am, tinauser <tinau...@libero.it> wrote:

Hi there,
here's my first message...please forgive my dumbness, I'm a new user
of Python and of OOp in general.

I created a scroll dialog, I would like to avoid that awful sound
occuring after destroying the dialog. Is that possible?
Thanks in advance.
I past here the code for the class DropDialog

class MyDropDialog(wx.Dialog):
def __init__(self, list, *args, **kwds):
# begin wxGlade: MyDialog.__init__
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.panel_1 = wx.Panel(self, -1)
self.label_1 = wx.StaticText(self.panel_1, -1, _("USERS"))
self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=list,
style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY)
self.button_1 = wx.Button(self, wx.ID_OK, "")
self.button_2 = wx.Button(self, wx.ID_CANCEL, "")
#self.Bind(wx.EVT_BUTTON,self.OnButton,self.button_1)

    self\.\_\_set\_properties\(\)
    self\.\_\_do\_layout\(\)
    \# end wxGlade

def \_\_set\_properties\(self\):
    \# begin wxGlade: MyDialog\.\_\_set\_properties
    self\.SetTitle\(\_\(&quot;USER SELECTION&quot;\)\)
    self\.SetSize\(\(300, 150\)\)
    self\.label\_1\.SetFont\(wx\.Font\(16, wx\.DEFAULT, wx\.NORMAL,

wx.BOLD, 0, ""))
self.combo_box_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
self.combo_box_1.SetSelection(0)
self.button_1.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
self.button_2.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL,
wx.NORMAL, 0, ""))
self.button_1.SetDefault()
# end wxGlade

def \_\_do\_layout\(self\):
    \# begin wxGlade: MyDialog\.\_\_do\_layout
    sizer\_1 = wx\.BoxSizer\(wx\.VERTICAL\)
    sizer\_2 = wx\.BoxSizer\(wx\.HORIZONTAL\)
    sizer\_3 = wx\.BoxSizer\(wx\.VERTICAL\)
    sizer\_3\.Add\(self\.label\_1, 0, wx\.ALIGN\_CENTER\_HORIZONTAL, 0\)
    sizer\_3\.Add\(self\.combo\_box\_1, 0, wx\.TOP|

wx.ALIGN_CENTER_HORIZONTAL, 10)
self.panel_1.SetSizer(sizer_3)
sizer_1.Add(self.panel_1, 1, wx.ALIGN_CENTER_HORIZONTAL|
wx.ALIGN_CENTER_VERTICAL, 0)
sizer_2.Add(self.button_1, 0, 0, 0)
sizer_2.Add(self.button_2, 0, wx.LEFT, 10)
sizer_1.Add(sizer_2, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5)
self.SetSizer(sizer_1)
self.Layout()

def GetStringSelection\(self\):
    return self\.combo\_box\_1\.GetStringSelection\(\)
def GetSelection\(self\):
    return self\.combo\_box\_1\.GetSelection\(\)

This is known as a non-working example. I use dialogs all the time and
they don't make any noise unless I use a MessageDialog. Even then, you
only here a sound when the dialog is displayed, not when it is
dismissed. I see no reason for you to hear anything from what code you
have supplied. What OS, Python and wxPython versions are you using?

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi,
the posted code seems to work fine and quietly for me (at win XP,
wxPython 2.8.10.1, py 2.5.4) - after replacing the missing
localication function _ with str.
I don't hear any system sound while displaying, hiding or destroying the dialog.
Maybe there is some other origin of those sounds or your OS behaves differently.
   vbr

···

2010/4/16 tinauser <tinauser@libero.it>:

Hi there,
here's my first message...please forgive my dumbness, I'm a new user
of Python and of OOp in general.

I created a scroll dialog, I would like to avoid that awful sound
occuring after destroying the dialog. Is that possible?
Thanks in advance.
I past here the code for the class DropDialog

class MyDropDialog(wx.Dialog):
def __init__(self, list, *args, **kwds):
...

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en