Problem geting the content off a TextCtrl
Alejandro Michelin Salomon ( Adinet )
alejmsg at adinet.com.uy
Wed Jul 19 06:00:03 PDT 2006
Hi:
I have a wx.TextCtrl named 'txtidsystem' in a wx.frame.
I two buttons.
When i click in the save button, i call --> def OnBtnSaveSystemButton(self,
event):
In side OnBtnSaveSystemButton i can't get the value for this control.
Defination:
self is my frame.
self.txtidsystem = wx.TextCtrl(id=wxID_SYSTEMS_NEWTXTIDSYSTEM,
name='txtidsystem', parent=self, pos=wx.Point(120, 40),
size=wx.Size(128, 21), style=wx._controls.TE_READONLY,
value='')
self.txtidsystem.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL,
False, 'Tahoma'))
def OnBtnSaveSystemButton(self, event):
sDescription = self.txtdescription.GetText()
nId = self.txtidsystem.GetValue() --> this line geave my
the error: AttributeError: 'int' object has no attribute 'GetValue'
How to get/set the value for a TextCtrl?
Thanks in advance.
More information about the wxpython-users
mailing list