Help with combobox being invisible after upgrading python

molitar at hotmail.com molitar at hotmail.com
Thu Apr 15 14:11:41 EDT 2004


I have a problem with combobox not showing after updating to latest Python.    Part of code below that worked fine until I updated.  The combobox is there and you can click on the invisible combobox and see 
the dropdown but the combobox itself is invisible.

import wx
from wxPython.wx import *
from wxPython import *
from webbrowser import open_new
from threading import Thread
from filemanager import *
from os import path
from os.path import join
from variable import *

class GlobalUploadDialog(wxDialog):
    def __init__(self, parent, ID, title,
                 pos=wxDefaultPosition, size=wxDefaultSize,
                 style=wxDEFAULT_DIALOG_STYLE):
        pre = wxPreDialog()
        pre.Create(parent, ID, title, pos, size, style)
        self.this = pre.this
        self.parent = parent


        # GUI dialog for Global upload setting
        ########################################
        loc_maxupload           = self.parent.abcparams['maxupload']
        loc_maxuploadrate       = self.parent.abcparams['maxuploadrate']
        loc_maxseeduploadrate   = self.parent.abcparams['maxseeduploadrate']
        loc_uploadopt           = self.parent.abcparams['uploadoption']
        loc_uploadtimeh         = self.parent.abcparams['uploadtimeh']
        loc_uploadtimem         = self.parent.abcparams['uploadtimem']
        loc_uploadratio         = self.parent.abcparams['uploadratio']

        ID_COMBOBOX_HTIME = wxNewId()
        ID_COMBOBOX_MTIME = wxNewId()
        ID_COMBOBOX_RATIO = wxNewId()

        self.cbhtime = wx.ComboBox(self,ID_COMBOBOX_HTIME, loc_uploadtimeh, wx.Point(150, 149),                                  
                                  wx.Size(37, -1), htimeval, wx.CB_DROPDOWN|wx.CB_READONLY)
        self.cbmtime = wxComboBox(self, ID_COMBOBOX_MTIME, loc_uploadtimem, wxPoint(198, 149),
                                  wxSize(37, -1), mtimeval, wxCB_DROPDOWN|wxCB_READONLY)
        self.cbhtime.SetValue(loc_uploadtimeh)
        self.cbmtime.SetValue(loc_uploadtimem)

        ratioval = ['50', '75', '100', '125', '150','175','200','300', '400', '500']
        self.cbratio = wxComboBox(self, ID_COMBOBOX_RATIO, loc_uploadratio,
                                  wxPoint(150, 173), wxSize(45, -1), ratioval, wxCB_DROPDOWN|wxCB_READONLY)
        self.cbratio.SetValue(loc_uploadratio)


Before updating to the latest version the comboboxes showed up fine.



More information about the Python-list mailing list