473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

wxPython problem switching between 2 wx.SplitterWindow's

I have posted this problem also on the wxpython-users list, but maybe
someone here can also help.

I want to keep 2 different views for the same object, both views using
SplitterWindow. So I am trying to create 2 SplitterWindow's, keeping both
in memory, and alternately show only one of them. However, that doesn't
work and I've tried all kinds of combinations of Show, SplitVertically,
UpdateSize, and Layout.

I think I have isolated the problem in this code snippet (also attached).
This code actually works. But un-comment the 2 lines for splitter2 and you
will see the problem:
#!/usr/bin/env python
import wx

class myFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self,
parent=parent)
self.SetClientSize(wx.Size(600, 500))
self.splitter1=wx.SplitterWindow(self)
self.splitter1.Hide()
#self.splitter2=wx.SplitterWindow(self) # un-comment and you'll
#self.splitter2.Hide() # see the problem
def showSplitter(self, id):
if id==1:
self.splitter1.Show()
if id==2:
self.splitter2.Show()

class myApp(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.mainWin = myFrame(None)
self.mainWin.Show()
self.SetTopWindow(self.mainWin)
self.mainWin.showSplitter(1)

return True

if __name__ == '__main__':
application = myApp(0)
application.MainLoop()

I have cut it down to the bone, so there are no children in the
SplitterWindow's and they are not even splitted. I assure you that the same
is happening in those cases. I am not invoking any Layout( ) here, but I've
tried that too.

Can anyone explain what is happening here? Am I missing a step somewhere?
Or could this actually be a bug in SplitterWindow?

Dan
Jul 18 '05 #1
0 1388

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Rick Muller | last post by:
I have a problem that I would like to get some advice on from other Pythonistas. I currently manage a (soon to be) open source project for displaying molecular graphics for a variety of different...
1
by: Gabriele Farina *DarkBard* | last post by:
Hi, there is a way to handle images directly from wxPython? I'd like to manage simple image handling, like drawing only a portion of an image, switching between two colors or drawing only some...
5
by: fooooo | last post by:
This is a network app, written in wxPython and the socket module. This is what I want to happen: GUI app starts. User clicks a button to 'start' the work of the app. When start is pressed, a new...
2
by: Ville Voipio | last post by:
I have a small problem; I would like to have a reasonable minimum size for a wx.Window. A simplified version of my code: s = wx.SplitterWindow(self, -1) curves = wx.Notebook(s) curve =...
9
by: amhoov | last post by:
Hi all, I'm trying to install wxPython on Debian using 'apt-get install python-wxgtk2.4.' I've got both Python 2.3 and 2.4 installed with 2.4 set as my default. For whatever reason, wxPython...
1
by: kath | last post by:
Hello, sorry about the lengthy message. I finding difficult to execute this program. The wx.Notebook i created is coming on the splitted frame(self.p2). How do I that. I am started to learn...
1
by: w.p. | last post by:
Hello! I have some trouble with my GUI. I have left panel with foldpanelbar, but i need one item but not collapsed - simple button. I split my left panel into two foldpanelbars with one button...
2
by: shuf | last post by:
Hello, I am running python 2.4.4 with wxpython 2.6 on Fedora 6. I am just playing around with the splitterwindow, and I noticed some strange behavior when resizing the window using the cursor...
2
by: BjornB | last post by:
Hi! I'm totally new to Python and I'm jus nw trying to create my first application with wxPython, exciting! However, I have a problem: I'm creating a Frame with a menu and buttonpanel...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.