473,467 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

wxSizer: Define sizer hierarchie before putting controls in or vice versa?

Hello,
I have a short question about sizers and how they work when I have a
frame or panel with a complex sizer hierarchie. When creating a new
sizer which sits itself in its parent sizer, should I add the new
sizer to the parent sizer and then populate the new sizer with its
controls (some of them might be sizers on their own) or should I
populate the new sizer with all its controls before I add the new
sizer to its parent sizer? Or doesn´t it make any difference and all
the sizes and sizers are calculated anyways when the
wx.Window.SetSizer(wx.Sizer),wx.Window.SetAutoLayo ut(True) and
wx.Sizer.Fit(wx.Window) functions are run before before the window is
finally made visible?
Thanx in advance
Peter
Jul 18 '05 #1
2 1824
On Sep 5, 2004, at 10:23 AM, Piet wrote:
Or doesn´t it make any difference and all
the sizes and sizers are calculated anyways when the
wx.Window.SetSizer(wx.Sizer),wx.Window.SetAutoLayo ut(True) and
wx.Sizer.Fit(wx.Window) functions are run before before the window is
finally made visible?


In my experience, it doesn't make any difference. Perhaps there is a
minor performance advantage one way or the other, but not enough for me
to ever worry about.

___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://dabodev.com/

Jul 18 '05 #2

"Piet" <pi********@gmx.de> wrote in message
news:39**************************@posting.google.c om...
Hello,
I have a short question about sizers and how they work when I have a
frame or panel with a complex sizer hierarchie. When creating a new
sizer which sits itself in its parent sizer, should I add the new
sizer to the parent sizer and then populate the new sizer with its
controls (some of them might be sizers on their own) or should I
populate the new sizer with all its controls before I add the new
sizer to its parent sizer? Or doesn´t it make any difference and all
the sizes and sizers are calculated anyways when the
wx.Window.SetSizer(wx.Sizer),wx.Window.SetAutoLayo ut(True) and
wx.Sizer.Fit(wx.Window) functions are run before before the window is
finally made visible?
Thanx in advance
Peter


I like to bunch everything together so its easier to see later.

#
self.linkpanel = wx.Panel(self.notebook,-1)
self.link_thing = LinkListCtrlPanel(self.linkpanel)
txtbox = wx.BoxSizer(wx.HORIZONTAL)
txtbox.Add(self.link_thing, 2, wx.EXPAND)
self.linkpanel.SetSizer(txtbox)
self.linkpanel.SetAutoLayout(1)
txtbox.Fit(self.linkpanel)
self.notebook.AddPage(self.linkpanel, "Links")
#

Tom
Jul 18 '05 #3

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

Similar topics

0
by: Piet | last post by:
Hello, I need some help with the design of a "dynamic" wxDialog. The dialog window is divided into several sizers, the first contains a wxComboBox. When choosing an entry from this wxComboBox, a...
0
by: Piet | last post by:
Hello wxPythoneers. I have a problem with a dialog box derived from wxFrame which has a wxComboBox as main element. Depending on the entry selected from the ComboBox, the dialog box will be...
1
by: Dharmendra Singh | last post by:
Hi I'm using .Net(C#) and working on the form(Screen) which have text boxes for both arabic and english data to store. So i want to change the language at run time from arabic to english and...
97
by: s | last post by:
Can I do this: #define MYSTRING "ABC" .. .. .. char mychar = MYSTRING; .. .. ..
6
by: Liz | last post by:
In VB.NET I add user defined controls to the main panel of a form :- Dim controlInfo As MainTemplate controlInfo = New Details controlInfo.Dock = DockStyle.Fill ' remove the old one if one...
2
by: Steve - DND | last post by:
Just wondering if anyone out there has any code to convert a plural word to it's singular form and vice versa. Most of our database tables are named in a plural fashion. When we go to create...
3
by: brian | last post by:
What are the advantages and disadvantages of using HTML Server Controls over Web Server Controls and vice versa? Is there a clear cut consensus among ASP.NET developers over which controls to use?...
8
by: Alan Silver | last post by:
Hello, ASP.NET newbie here so please be nice ;-) I'm reading ASP.NET Unleashed, following a recommendation here. I am a little confused about the difference between HTML controls and web...
1
by: Maric Michaud | last post by:
Le Tuesday 24 June 2008 07:08:46 swapna mudavath, vous avez écrit : This is not valid xml, there is no commas in attribute list in xml. You could try with minidom if your xml stream isn't too...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.