Chat widget now is multiline. Add new lines with shift+enter

This commit is contained in:
Manuel Cortez 2018-12-19 04:32:47 -06:00
parent eb545f3763
commit ea005587de
2 changed files with 3 additions and 2 deletions

View File

@ -736,7 +736,8 @@ class chatBuffer(baseBuffer):
self.tab.set_focus_function(self.onFocus)
def catch_enter(self, event, *args, **kwargs):
if event.GetKeyCode() == wx.WXK_RETURN:
shift=event.ShiftDown()
if event.GetKeyCode() == wx.WXK_RETURN and shift == False:
self.send_chat_to_user()
event.Skip()

View File

@ -168,7 +168,7 @@ class chatTab(wx.Panel):
def create_chat(self):
lbl2 = wx.StaticText(self, -1, _(u"Write a message"))
self.text = wx.TextCtrl(self, -1)
self.text = wx.TextCtrl(self, -1, size=(400, -1), style=wx.TE_MULTILINE)
box = wx.BoxSizer(wx.HORIZONTAL)
box.Add(lbl2, 0, wx.ALL, 20)
box.Add(self.text, 0, wx.ALL, 5)