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