diff --git a/gooey/gui/components/widgets/richtextconsole.py b/gooey/gui/components/widgets/richtextconsole.py index ee01eb0a..20557bdb 100644 --- a/gooey/gui/components/widgets/richtextconsole.py +++ b/gooey/gui/components/widgets/richtextconsole.py @@ -57,10 +57,12 @@ def __init__(self, parent): # Actions for coloring text for index, hex in enumerate(kColorList): escSeq = '{}{}{}'.format(colored.fore.ESC, index, colored.fore.END) + escSeqShort = '\x1b[0;{}{}'.format(index, colored.fore.END) wxcolor = wx.Colour(int(hex[1:3],16), int(hex[3:5],16), int(hex[5:],16), alpha=wx.ALPHA_OPAQUE) # NB : we use a default parameter to force the evaluation of the binding - self.actionsMap[escSeq] = lambda bindedColor=wxcolor: self.BeginTextColour(bindedColor) - + self.actionsMap[escSeqShort] = self.actionsMap[escSeq] = \ + lambda bindedColor=wxcolor: self.BeginTextColour(bindedColor) + self.Bind(wx.EVT_MOUSEWHEEL, self.onMouseWheel)