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" <da...@gm...>
> To: "Boa Constructor" <boa...@li...>
> 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
|