ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxpython-users
wxpython-users
Re: [wxpython-users] Writetext from one frame event toanotherframetextctrl.
by Josiah Carlson other posts by this author
Jul 8 2008 2:05PM messages near this date
Re: [wxpython-users] Writetext from one frame event toanotherframetextctrl. | Re: [wxpython-users] Writetext from one frame event toanotherframetextctrl.
Steve,

Like Mike, for 90% of the layout that I do, I pull out a piece of
paper and sketch what I want first.  I also think of everything as
rectangular boxes containing other boxes (rows or columns).  On
occasion, when I need things to align both vertically and horizontally
I end up going with the GridSizer, but for 95% of what I do, the
standard BoxSizers work just fine.

When I want to re-use stuff I will do as Timothy does and create
smaller panels, then group them together in a larger panel, etc.  But
much of what I do is one-off.

Whenever possible, I try to use wx.lib.pubsub to handle communication
and method invocation when I need an event in one wx object to affect
something in a different wx object.  It is made easier with a little
boilerplate...

def BindPubsub(wxobj, eventid, topic, object=None):
	def fcn(event):
		pubsub.sendMessage(topic, event)
	wxobj.Bind(eventid, fcn, object)

Used like...

BindPubsub(self, wx.EVT_BUTTON, 'main.button.clicked', button)

Now anyone can pick up those events :)

 - Josiah

On Tue, Jul 8, 2008 at 1:39 PM, Mike Driscoll <mike@[...].org>  wrote:
>  Steve,
> 
> > Mr. Carlson, you are right, I could / should have sought others for help.
> > In this istance, the people on this mailing list have made themselves
> > available beyond my expectations.  I just didn't want to ask a question
> > where
> > the answer was obvious and obliviate my chance for getting information in
> > the future.  The poster who cried wolf too many times over trivial things in
> > my mind starts to get overlooked.
> >
> > Thank you all for the help...  BTW using sizers (which I am having
> > success) on a frame with scads of widgets is like doing a Rubik's Cube
> > puzzle.  Any tips?
> 
>  The easiest way to approach it (in my opinion) is to think of it as a bunch
>  of boxes nested in each other. Sometimes it helps to make a crude sketch on
>  paper first and then choose your sizers appropriately. For example, if I was
>  doing a calculator like the one included with Windows, I'd probable use a
>  vertically oriented BoxSizer with a nested GridSizer or GridBagSizer. You
>  can get a better grasp for of where your sizers are by using the Widget
>  Inspector.
> 
>  You're also welcome to check out my fairly basic sizer tutorials on my blog.
>  Some of them have made their way into the wiki too...and there are some
>  other tutorials on the wiki too.
> 
>  -------------------
>  Mike Driscoll
> 
>  Blog:   http://blog.pythonlibrary.org
>  Python Extension Building Network:     http://www.pythonlibrary.org
> 
>  _______________________________________________
>  wxpython-users mailing list
>  wxpython-users@[...].org
>  http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
> 
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Steve Freedenburg
Mike Driscoll
Josiah Carlson
Timothy Grant

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved