Hello Ray,
just use a panel over the frame... usually is a good practice to put controls
on a Panel, instead that directly in a frame (there are exceptions, however).
I have tried the code below and it works (XP, 2.6.0.0, 2.3.4)
HTH.
Andrea.
import wx
import time
class MainFrame (wx.Frame):
def __init__ (self, parent, id=-1, title='Default Frame Title',
size=(200, 150), pos=(100, 75)):
wx.Frame.__init__ (self, parent, id, title=title, size=size, pos=pos)
panel = wx.Panel(self, -1)
self.SetBackgroundColour ( (225, 225, 245) )
## wx.StaticText (self, -1, '', (50, 15)) # This cannot be eliminated
!
barlen = 300; barhgt = 25
g1 = wx.Gauge (panel, -1, 50, (50, 50), (barlen, barhgt))
self.CenterOnScreen()
self.Show (True)
···
#-----------------------------#
count = 0
while (True):
g1.SetValue (count)
count += 1
if count >= 50: count = 0
wx.Yield ()
time.sleep (0.05)
#end while
#end def __init__
#end class MainFrame
if __name__ == '__main__':
myApp = wx.PySimpleApp()
myFrame = MainFrame (None, -1, 'Progress Bar Gauge Demo (modified)',
size=(400, 150), pos=(0, 0))
myApp.MainLoop()
#end if