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] Re: wx.Panel doubts...
by C M other posts by this author
May 9 2008 10:02AM messages near this date
Re: [wxpython-users] Re: wx.Panel doubts... | [wxpython-users] wx.ListCtrl Error When Loading Values
On Fri, May 9, 2008 at 10:51 AM, David Anderson <zerty.david@[...].com>  wrote:
>  The centering stuff I want to do is like this
> 
>  Label
>  Png Image
>                                |Flex | grid            | Sizer|
>                                |____|__________|______|
>                                |____|__________|______|
>                                |____|__________|______|
>                                | ___|__________|______|
> 
>  What's the best way to do this?
>  I want the Grid centered horizontally like that, just above the label, which
>  I want to be Align Left, and the image, aligned Right...

At least on my email I'm not sure if your description matches the
ASCII art you've made here.  You could attach a little sketch image if
you want.  It also suggests possibly you are confusing a FlexGridSizer
with a wxGrid?  Maybe?  Have you checked both out in the demo?

In either case, I'd say you have to think in this order (for most
layouts, actually):

1. Create a wxFrame
2. Create a wxPanel on that frame (as the background for everything
that follows)
3. Create a wxBoxSizer set to that panel (horizontal or vertical
boxsizer, depending if you want what follows to go one after the other
*across* the screen or one after the other *down* the screen).
4. Add your widgets to this BoxSizer and set their properties (whether
they have borders, should expand, etc.  Can do a lot here).
5. Note that you can add another sizer to this BoxSizer, so you can
make complex sizing rules this way.  It has it's own puzzle-like logic
that takes a little getting used to.

So, in step 5, if you want it to be a FlexGridSizer, you'd add a
FlexGridSizer, and then of course you'd add new widgets to that sizer,
too.  If you actually want it to be a wxGrid (like a grid you'd see in
Excel), you'd just add a wxGrid.

HTH
Che
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
David Anderson
David Anderson
Mark Erbaugh
Kalle Haglunds
python
David Anderson
Mike Driscoll
Jorgen Bodde
David Anderson
Robin Dunn
David Anderson
Robin Dunn
David Anderson
Robin Dunn
C M

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