wxTextCtrl + wxGrid

Gerhard Häring gerhard.haering at gmx.de
Tue Jul 30 15:02:22 EDT 2002


* Thorsten Gawantka <t.gawantka at freenet.de> [2002-07-30 11:16 +0200]:
> Hi Group,
> how can I get the Value of wxTextCtrl into a Cell of wxGrid?
> my actual code is
> 
> --
> ## Copy the textCtrl.Value into gridCell
> self.grid.SetCellValue(i, 0, self.edit_p1.GetValue)
> ##
> --
> 
> this is not functional, because the python interpreter 
> want to have a string.
> How can I get this solved?

By calling the GetValue method :-)

"self.edit_p1.GetValue" actually gets a reference to the GetValue
method, but doesn't call it. if you actually call the method with
.GetValue() you will get a string instead of the method reference you
get right now.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9  3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))




More information about the Python-list mailing list