473,322 Members | 1,496 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,322 software developers and data experts.

Panel problems

Howdy,
I am having some problems woth sizers adding panels to a
scrolledwindow.

I have 3 classes (wx.Panels) which I want to add to a ScrolledWindow
(The Parent). I can get it to work except the ScrollWindow never
scrolls.
Also as I am new to (wx)Python, so I am sure it is a simple mistake.
But what I cannot figure out is the creation order of Frames to Panels
to Windows, sizers, blah...Is this infomation laid out some where?

Any help would be apperciated.
class MyFrame(wx.Frame):
def __init__(self, parent, ID, title):
wx.Frame.__init__(self, parent, ID, title,
style=wx.DEFAULT_FRAME_STYLE
| wx.CLIP_CHILDREN
| wx.NO_FULL_REPAINT_ON_RESIZE)

self.MaintPanel = wx.ScrolledWindow(self, -1,
style=wx.SUNKEN_BORDER
| wx.CLIP_CHILDREN)
self.MaintPanel.SetScrollRate(10, 10)

# Do I need another Sizer in here somewhere??

#Parent Sizer
#self.mainsizer = wx.BoxSizer(wx.VERTICAL)
#self.SetSizer(self.mainsizer)
#self.SetSize(( 700, 600 ))
#self.Centre()

self.subsizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(self.subsizer)
self.SetSize(( 700, 600 ))
self.Centre()

# Add subPanels
# All of the sub panels work fine
pnl1 = subPanel1(self)
pnl2 = subPanel2(self)
pnl3 = subPanel3(self)

self.subsizer.AddMany([ (pnl1, 1, wx.EXPAND),
(pnl2, 1, wx.EXPAND),
(pnl3, 1, wx.EXPAND)])

# Add Main Panel
self.MaintPanel.SetAutoLayout(True)
self.MaintPanel.SetSizer(self.subsizer)

self.Layout()

Thanks in advance
Scott

Jul 18 '05 #1
0 1027

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

Similar topics

1
by: R6_2003 | last post by:
Hello all, i dunno if that's the right newsgroup to ask, but i'll try, please ignore me if u feel its not 0:) i've been messing with a control panel app for so long.. previously i was using...
1
by: Robert Skidmore | last post by:
I am building an application that will fade one panel to another panel. Both panels will have picture boxes in them (thumbnails). This is what I have tried: private void...
1
by: Jay | last post by:
I need to be able to move a Panel on a windows Form at run time using the mouse. I have tried adding a MouseDown event handler to the Panel and then within the MouseDown handler adding a MouseMove...
1
by: Wolfgang | last post by:
I'm a Java developer relatively new to to VB .NET (and I don't know the old VB6 at all). I know how to draw lines, circles and other simple shapes on a form in VB.NET (using the onPaint event)....
2
by: intrepid_dw | last post by:
All I am writing a C# WinForms application which is giving me some problems. The application consists of a form containing an empty Tab control to which TabPages are added dynamically (at...
1
by: lodhaakhil85 | last post by:
Hi I'm a newbie to C# and GDI+.I am writing an application that will display some strings from a file on a panel. There are a few of problems I am facing : 1.How do make the panel re-adjust...
1
by: TheSteph | last post by:
Hi ! I would like to create a UserControl that act as a « Collapsible Panel ». So I have a UserControl with two panels : a "Header panel" at the top, and a "Container Area Panel"...
4
by: tshad | last post by:
I am trying to hide and show certain parts of my code (which I have no problem doing with DW). In VS 2003, it won't let you use <div runat="server"to section of parts of my code in a table. This...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
1
by: mbruyns | last post by:
i have been trying (and sometimes succeeding) to use the modalpopupextender to show various panels of controls on my asp pages. the strange problem that i keep on running into is that sometimes it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.