Align form ?

Fernando Paiva wrote:

hello all
anybody has a code for align all forms before open ?
example:
import Customer
customer = Customer.Customer(self)
customer.ShowModal()
I want a code that align all forms in center of parent.

You probably want the CenterOnParent() method. Otherwise you'll probably have to get the parent's position, do a little math (something like width / 2, height / 2) and then SetPosition().

Hope that gets you going.

···

-------------------
Mike Driscoll

Blog: http:\\blog.pythonlibrary.org
Python Extension Building Network: http:\\www.pythonlibrary.org

thanks Mike

did I make this:

import Customer
customer = Customer.Customer(self)
customer.CenterOnParent()
customer.ShowModal()

the result was very good !!!

thank you !

···

----- Original Message ----- From: "Mike Driscoll" <mike@pythonlibrary.org>
To: <wxpython-users@lists.wxwidgets.org>
Sent: Friday, June 06, 2008 2:38 PM
Subject: Re: [wxpython-users] Align form ?

Fernando Paiva wrote:

hello all
anybody has a code for align all forms before open ?
example:
import Customer
customer = Customer.Customer(self)
customer.ShowModal()
I want a code that align all forms in center of parent.

You probably want the CenterOnParent() method. Otherwise you'll probably have to get the parent's position, do a little math (something like width / 2, height / 2) and then SetPosition().

Hope that gets you going.

-------------------
Mike Driscoll

Blog: http:\\blog.pythonlibrary.org
Python Extension Building Network: http:\\www.pythonlibrary.org

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
No virus found in this incoming message.
Checked by AVG. Version: 7.5.524 / Virus Database: 269.24.6/1487 - Release Date: 6/6/2008 08:01