please help with wx.dialog
"Fernando Paiva" <[email protected]>
| Newsgroups | gmane.comp.ide.boa-constructor.user |
|---|---|
| Message-ID | <002501c8c104$b10f9ec0$fe01a8c0@negao> |
Hello All
I am facing a problem that can not resolve. I have two wx.Dialog form, their name are: Customer and SearchCustomer
In the form Customer I have a button that invoke a SearchCustomer form, the SearchCustomer form has a grid that is filled with the results of the consultation
In the SearchCustomer form, I have a function below.
def OnGridSearchCustomerGridCellLeftDclick(self, event):
import Customer
customer = Customer.Customer(self)
row = event.GetRow()
codeOfCustomer = self.gridSearchCustomer.GetCellValue(row, 0)
self.Close()
customer.receiveSearch(int(codeOfCustomer))
In the Customer form, I have a function below.
def receiveSearch(self, codeOfCustomer):
self.intCtrlCode.SetValue(codeOfCustomer)
try:
_sql = """
SELECT customer_code, customer_name FROM customer WHERE customer_code = %s
""" % (codeOfCustomer)
self.cursor.execute(_sql)
registers = self.cursor.fetchall()
for x in registers:
self.textCtrlName.SetValue(x["customer_name"])
except MySQLdb.Error, e:
wx.MessageBox("Error %d: %s" %(e.args[0], e.args[1]))
When I give a command "print", the values is all right, but the fields "textCtrlName" not update with a Set Value. I don't understand because.
Any Idea ???
Please excuse my errors of English.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Boa-constructor-users mailing list
Boa-constructor-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/boa-constructor-users