here is my code
python 2.7 & wxpython 2.8
these 3 textctrl, at the chat_c(textctrl)
i want to make chat_c and text_c like a chatting room
input is chat_c output is text_c
that is why i use
def OnReturnDown(self,e):
key = e.GetKeyCode()
self.text_c.SetValue(key) #for check out but doesn't work
if key == wx.WXK_RETURN:
self.text_c.SetValue(self.chat_c.GetValue())
#key bind
self.chat_c.Bind(wx.EVT_KEY_DOWN, self.OnReturnDown)
this is error message
Traceback (most recent call last):
File "C:\workspace\wx_python_test\main_chat_client.py", line 239, in OnReturnDown
self.text_c.SetValue(key) #for check out but doesn't work
File "C:\Python27\Lib\site-packages\wx-2.8-msw-unicode\wx\_controls.py", line 1754, in SetValue
return _controls_.TextCtrl_SetValue(*args, **kwargs)
TypeError: String or Unicode type required
what is that? Unicode type required???
maybe change the style of textctrl?
how can fix this?