Python wx.TE_RICH Examples

The following are 6 code examples of wx.TE_RICH(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wx , or try the search function .
Example #1
Source File: runtime_display_panel.py    From me-ica with GNU Lesser General Public License v2.1 5 votes vote down vote up
def _init_components(self):
    self.text = wx.StaticText(self, label=i18n._("status"))

    self.cmd_textbox = wx.TextCtrl(
      self, -1, "",
      style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH) 
Example #2
Source File: monitorpage.py    From magpy with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def createControls(self):
        # all buttons open dlg to add parameters (e.g. IP, 
        self.getMARTASButton = wx.Button(self,-1,"Connect to MARTAS", size=(160,30))
        self.getMARCOSButton = wx.Button(self,-1,"Connect to MARCOS", size=(160,30))
        #self.getMQTTButton = wx.Button(self,-1,"Connect to MQTT", size=(160,30))
        self.martasLabel = wx.TextCtrl(self, value="not connected", size=(160,30), style=wx.TE_RICH)  # red bg
        self.marcosLabel = wx.TextCtrl(self, value="not connected", size=(160,30), style=wx.TE_RICH)  # red bg
        #self.mqttLabel = wx.TextCtrl(self, value="not connected", size=(160,30), style=wx.TE_RICH)  # red bg
        self.marcosLabel.SetEditable(False)
        self.martasLabel.SetEditable(False)
        #self.mqttLabel.SetEditable(False)
        # Parameters if connection is established
        # 
        self.coverageLabel = wx.StaticText(self, label="Plot coverage (sec):", size=(160,30))
        self.coverageTextCtrl = wx.TextCtrl(self, value="600", size=(160,30))

        self.sliderLabel = wx.StaticText(self, label="Update period (sec):", size=(160,30))
        self.frequSlider = wx.Slider(self, -1, 10, 1, 60, (-1, -1), (100, -1),
                wx.SL_AUTOTICKS | wx.SL_HORIZONTAL | wx.SL_LABELS)

        self.startMonitorButton = wx.Button(self,-1,"Start Monitor", size=(160,30))  # if started then everything else will be disabled ..... except save monitor
        self.stopMonitorButton = wx.Button(self,-1,"Stop Monitor", size=(160,30))

        self.saveMonitorButton = wx.Button(self,-1,"Log data*", size=(160,30))  # produces a bin file
        #self.startMonitorButton.Disable()
        self.saveMonitorButton.Disable()
        # Connection Log
        # 
        self.connectionLogLabel = wx.StaticText(self, label="Connection Log:")
        self.connectionLogTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,300),
                          style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) 
Example #3
Source File: runtime_display_panel.py    From pyFileFixity with MIT License 5 votes vote down vote up
def _init_components(self):
    self.text = wx.StaticText(self, label=i18n._("status"))
    self.cmd_textbox = wx.TextCtrl(
      self, -1, "",
      style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH)
    if self.build_spec.get('monospace_display'):
      pointsize = self.cmd_textbox.GetFont().GetPointSize()
      font = wx.Font(pointsize, wx.FONTFAMILY_MODERN,
                   wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False)
      self.cmd_textbox.SetFont(font) 
Example #4
Source File: basictextconsole.py    From Gooey with MIT License 5 votes vote down vote up
def __init__(self, parent):
        super(BasicTextConsole, self).__init__(parent, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH | wx.TE_AUTO_URL ) 
Example #5
Source File: chooser.py    From Gooey with MIT License 5 votes vote down vote up
def __init__(self, *args, **kwargs):
        defaults = {'label': _('choose_colour'),
                    'style': wx.TE_RICH}
        super(ColourChooser, self).__init__(*args, **merge(kwargs, defaults)) 
Example #6
Source File: guicontrols.py    From wfuzz with GNU General Public License v2.0 5 votes vote down vote up
def __init__(self, parent, interpreter):
        # begin wxGlade: MyFrame.__init__
        wx.Panel.__init__(self, parent, -1)

        self.history = []
        self.index = 0

        self.prompt = ">>"
        self.textctrl = wx.TextCtrl(self, -1, '', style=wx.TE_PROCESS_ENTER | wx.TE_MULTILINE | wx.TE_RICH, size=(-1, 250))
        self.textctrl.SetForegroundColour(wx.WHITE)
        self.textctrl.SetBackgroundColour(wx.BLACK)

        self.textctrl.AppendText(self.prompt)

        self.textctrl.Bind(wx.EVT_CHAR, self.__bind_events)

        sizer = wx.BoxSizer()
        sizer.Add(self.textctrl, 1, wx.EXPAND)
        self.SetSizer(sizer)

        self._interp = interpreter
        redir = RedirectText(self.textctrl)

        import sys

        # Create a replacement for stdin.
        # self.reader = PseudoFileIn(self.readline, self.readlines)
        # self.reader.input = ''
        # self.reader.isreading = False

        # sys.stdin=self.reader
        sys.stdout = redir
        sys.stderr = redir