Chat widget now is multiline. Add new lines with shift+enter
This commit is contained in:
parent
eb545f3763
commit
ea005587de
@ -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()
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user