Re: Align form ?

damufo <[email protected]>
Newsgroups gmane.comp.ide.boa-constructor.user
Message-ID <[email protected]>

Fernando Paiva escribiu:
> hello damufo
> 
> I did make this.
> 
> import customer
> customerForm = customer.customer(self)
> customer.CenterOnParent()
> customer.ShowModal()
> 
> done and success !
> 
> thanks !
you are wellcome!

> 
> ----- Original Message ----- From: "damufo" <[email protected]>
> To: "Boa Constructor" <boa-constructor-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> Sent: Saturday, June 07, 2008 8:07 PM
> Subject: Re: [Boa Constr] Align form ?
> 
> 
>>
>>
>> Fernando Paiva escribiu:
>>> 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.
>>>
>>>
>>
>> in __init__ of customer
>> self.Center()
>>>
>>>

More...

code in other form

import dialog

     def on_bt_lanzar_dialog_button(self, event):
         dlg = Dialog1.Dialog1(self)
         try:
             dlg.ShowModal()
         finally:
             dlg.Destroy()
         event.Skip()

#Boa:Dialog:Dialog1

import wx

def create(parent):
     return Dialog1(parent)

[wxID_DIALOG1] = [wx.NewId() for _init_ctrls in range(1)]

class Dialog1(wx.Dialog):
     def _init_ctrls(self, prnt):
         wx.Dialog.__init__(self, style=wx.DEFAULT_DIALOG_STYLE, 
name='', parent=prnt, title='Dialog1', pos=wx.Point(-1, -1), 
id=wxID_DIALOG1, size=wx.Size(-1, -1))

     def __init__(self, parent):
         self._init_ctrls(parent)
         self.Center() #this make center dialog or form

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.