I have tried to add a .Center() but it doesn’t center it, inside of the class instantiation I have tried some various settings but no love. Any ideas what I am doing wrong? The pane shows up and works fine, its just not centered.
Hi, I am new in wx.Python. I am digesting somebody else’s code and can’t understand what does wx.ALL do in a sizer.Add statement. Here is a sample code:
From: Song Cao [mailto:scao@ashton-systems.com]
Sent: Friday, October 05, 2007 3:36 PM
To: wxPython-users@lists.wxwidgets.org
Subject: what is the wx.ALL in sizer flag.
Hi, I am new in wx.Python. I am digesting somebody else's
code and can't understand what does wx.ALL do in a sizer.Add
statement. Here is a sample code:
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.488 / Virus Database: 269.14.0/1049 - Release
Date: 04/10/2007 8:59 AM
Basically wx.ALL tells the sizer that it wants x amount of space on all
four sides. In your case, it would have 1 pixel on the left, right, top
and bottom.
# not all of the arguments are required
sizer.Add(someControl/sizer, proportion, flag(s), border)
I have tried to add a .Center() but it doesn't center it, inside of the class instantiation I have tried some various settings but no love. Any ideas what I am doing wrong? The pane shows up and works fine, its just not centered.
What that does is drops the floating pane into the middle of my AUI managed
frame, thus no longer making it a floating pane I should have mentioned
that in my first post.
JS
···
-----Original Message-----
From: jonhattan [mailto:jonhattan@faita.net]
Sent: Saturday, October 06, 2007 4:59 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Centering a Floating Window
Justin Seitz escribió:
>
> add_node_pane =
> /self/._mgr.GetPane(/"add_new_node"/).Float().Center().Show()
>
> /self/._mgr.Update()
>
>
>
> I have tried to add a .Center() but it doesn't center it, inside of
> the class instantiation I have tried some various settings but no
> love. Any ideas what I am doing wrong? The pane shows up and works
> fine, its just not centered.
>
> JS
>
try with CenterPane()
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org
I have tried to add a .Center() but it doesn't center it, inside of the class instantiation I have tried some various settings but no love. Any ideas what I am doing wrong? The pane shows up and works fine, its just not centered.
Center() just sets the dock_direction member to wxAUI_DOCK_CENTER, so it just affects default docking positions similar to Left(), Right(), Top() and Bottom(). You'll probably need to calculate and set the FloatingPosition yourself instead.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!