Help with combobox being invisible after upgrading python

M

molitar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top