wxPython on RedHat 7.3 (GNOME 1.4 I think???)
Cliff Wells
LogiplexSoftware at earthlink.net
Fri Jan 17 12:52:12 EST 2003
On Fri, 2003-01-17 at 09:33, Sean wrote:
> Here is a sample program that creates a small frame and adds a toolbar
> with 2 wxStaticText controls. Under both KDE and Gnome (on both
> redhat 7.3 and 8.0) the static text will disappear anytime you resize
> the frame. The only way to get it back is to give focus to another
> window, and then focus to the frame.
>
>
> from wxPython.wx import *
>
> ID_ABOUT = 101
> ID_EXIT = 102
>
> class MyFrame(wxFrame):
> def __init__(self, parent, ID, title):
> wxFrame.__init__(self, parent, ID, title,
> wxDefaultPosition, wxSize(400, 250))
>
>
> self.toolBar =
> self.CreateToolBar(wxTB_HORIZONTAL|wxTB_3DBUTTONS, NewId(), "ToolBar")
>
> #add state combo boxs
> id = NewId()
> self.toolBar.AddControl(wxStaticText(self.toolBar, id, "Static
> Text 1: "))
>
> id = NewId()
> self.toolBar.AddControl(wxStaticText(self.toolBar, id, "Static
> Text 2: "))
>
>
> self.toolBar.Realize()
>
>
>
> class MyApp(wxApp):
> def OnInit(self):
> frame = MyFrame(NULL, -1, "Hello from wxPython")
> frame.Show(true)
> self.SetTopWindow(frame)
> return true
>
> app = MyApp(0)
> app.MainLoop()
Hm. It seems to work fine for me on Redhat 8.0, using wxPython
2.3.4p2. What version of wxPython are you using?
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308 (800) 735-0555 x308
More information about the Python-list
mailing list