Python wx.TE_READONLY Examples
The following are 30
code examples of wx.TE_READONLY().
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: misc.py From trelby with GNU General Public License v2.0 | 7 votes |
def __init__(self, parent, text, title): wx.Dialog.__init__(self, parent, -1, title, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) vsizer = wx.BoxSizer(wx.VERTICAL) tc = wx.TextCtrl(self, -1, size = wx.Size(400, 200), style = wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_LINEWRAP) tc.SetValue(text) vsizer.Add(tc, 1, wx.EXPAND); vsizer.Add(wx.StaticLine(self, -1), 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 5) okBtn = gutil.createStockButton(self, "OK") vsizer.Add(okBtn, 0, wx.ALIGN_CENTER) util.finishWindow(self, vsizer) wx.EVT_BUTTON(self, okBtn.GetId(), self.OnOK) okBtn.SetFocus()
Example #2
Source File: new_properties.py From wxGlade with MIT License | 6 votes |
def create_text_ctrl(self, panel, value): style = 0 if self.readonly: style = wx.TE_READONLY if self.multiline: style |= wx.TE_MULTILINE else: style |= wx.TE_PROCESS_ENTER if not self._HORIZONTAL_LAYOUT: style |= wx.HSCROLL if self.multiline=="grow": text = ExpandoTextCtrl( panel, -1, value or "", style=style ) #text.Bind(EVT_ETC_LAYOUT_NEEDED, self.on_layout_needed) text.SetWindowStyle(wx.TE_MULTILINE | wx.TE_RICH2) text.SetMaxHeight(200) else: text = wx.TextCtrl( panel, -1, value or "", style=style ) # bind KILL_FOCUS and Enter for non-multilines text.Bind(wx.EVT_KILL_FOCUS, self.on_kill_focus) text.Bind(wx.EVT_SET_FOCUS, self.on_focus) # XXX text.Bind(wx.EVT_CHAR, self.on_char) text.Bind(wx.EVT_TEXT, self._on_text) return text
Example #3
Source File: main.py From wxGlade with MIT License | 6 votes |
def __init__(self, parent): wx.Panel.__init__( self, parent, -1, name='PropertyPanel' ) self.SetBackgroundColour( compat.wx_SystemSettings_GetColour(wx.SYS_COLOUR_BTNFACE) ) self.current_widget = None # instance currently being edited self.next_widget = None # the next one, will only be edited after a small delay self.pagenames = None sizer = wx.BoxSizer(wx.VERTICAL) self.heading = wx.TextCtrl(self, style=wx.TE_READONLY) sizer.Add(self.heading, 0, wx.EXPAND, 0) self.notebook = wx.Notebook(self) self.notebook.Bind(wx.EVT_SIZE, self.on_notebook_size) sizer.Add(self.notebook, 1, wx.EXPAND, 0) # for GTK3: add a panel to determine page size p = wx.Panel(self.notebook) self.notebook.AddPage(p, "panel") self._notebook_decoration_size = None p.Bind(wx.EVT_SIZE, self.on_panel_size) self.SetSizer(sizer) self.Layout()
Example #4
Source File: FontColour.py From wxGlade with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MyFrame.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.SetTitle(_("frame_1")) sizer_1 = wx.BoxSizer(wx.VERTICAL) self.text_ctrl_1 = wx.TextCtrl(self, wx.ID_ANY, _("Some Input"), style=wx.TE_READONLY) self.text_ctrl_1.SetBackgroundColour(wx.Colour(0, 255, 127)) self.text_ctrl_1.SetForegroundColour(wx.Colour(255, 0, 0)) self.text_ctrl_1.SetFont(wx.Font(16, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, "")) self.text_ctrl_1.SetFocus() sizer_1.Add(self.text_ctrl_1, 1, wx.ALL | wx.EXPAND, 5) self.SetSizer(sizer_1) sizer_1.Fit(self) self.Layout() # end wxGlade # end of class MyFrame
Example #5
Source File: bugdialog_ui.py From wxGlade with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: UIBugDialog.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER wx.Dialog.__init__(self, *args, **kwds) self.SetSize((600, 400)) self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=wx.NB_BOTTOM) self.nb1_pane_summary = wx.Panel(self.notebook_1, wx.ID_ANY) self.st_header = wx.StaticText(self.nb1_pane_summary, wx.ID_ANY, _("An internal error occurred while %(action)s")) self.st_summary = wx.StaticText(self.nb1_pane_summary, wx.ID_ANY, _("Error type: %(exc_type)s\nError summary: %(exc_msg)s")) self.st_report = wx.StaticText(self.nb1_pane_summary, wx.ID_ANY, _("This is a bug - please report it.")) self.nb1_pane_details = wx.Panel(self.notebook_1, wx.ID_ANY) self.st_details = wx.StaticText(self.nb1_pane_details, wx.ID_ANY, _("Error details:")) self.tc_details = wx.TextCtrl(self.nb1_pane_details, wx.ID_ANY, "", style=wx.TE_MULTILINE) self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY) self.tc_howto_report = wx.TextCtrl(self.notebook_1_pane_1, wx.ID_ANY, _("Writing a helpful bug report is easy if you follow some hints. The items below should help you to integrate useful information. They are not an absolute rule - it's more like a guideline.\n\n- What did you do? Maybe you want to include a screenshot.\n- What did you want to happen?\n- What did actually happen?\n- Provide a short example to reproduce the issue.\n- Include the internal error log file %(log_file)s if required.\n\nPlease open a new bug in the wxGlade bug tracker https://github.com/wxGlade/wxGlade/issues/ .\nAlternatively you can send the bug report to the wxGlade mailing list wxglade-general@lists.sourceforge.net. Keep in mind that you need a subscription for sending emails to this mailing list.\nThe subscription page is at https://sourceforge.net/projects/wxglade/lists/wxglade-general ."), style=wx.TE_MULTILINE | wx.TE_READONLY) self.static_line_1 = wx.StaticLine(self, wx.ID_ANY) self.btn_copy = wx.Button(self, wx.ID_COPY, "") self.btn_ok = wx.Button(self, wx.ID_OK, "") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnCopy, self.btn_copy) # end wxGlade
Example #6
Source File: xrced.py From admin4 with Apache License 2.0 | 6 votes |
def __init__(self, parent, msg, caption, pos = wx.DefaultPosition, size = (500,300)): from wx.lib.layoutf import Layoutf wx.Dialog.__init__(self, parent, -1, caption, pos, size) text = wx.TextCtrl(self, -1, msg, wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE | wx.TE_READONLY) text.SetFont(g.modernFont()) dc = wx.WindowDC(text) # !!! possible bug - GetTextExtent without font returns sysfont dims w, h = dc.GetFullTextExtent(' ', g.modernFont())[:2] ok = wx.Button(self, wx.ID_OK, "OK") text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok))) text.SetSize((w * 80 + 30, h * 40)) text.ShowPosition(1) ok.SetConstraints(Layoutf('b=b5#1;x%w50#1;w!80;h!25', (self,))) self.SetAutoLayout(True) self.Fit() self.CenterOnScreen(wx.BOTH) ################################################################################ # Event handler for using during location
Example #7
Source File: guicontrols.py From wfuzz with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent, frame): self._frame = frame wx.Panel.__init__(self, parent, -1) # self.req_txt = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY) self.req_txt = webview.WebView.New(self) # self.resp_txt = webview.WebView.New(self) self.resp_txt = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE | wx.TE_READONLY) sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(self.req_txt, 1, wx.EXPAND) sizer.Add(self.resp_txt, 1, wx.EXPAND) self.SetSizer(sizer) self.SetAutoLayout(True)
Example #8
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def __init__(self): text=self.text self.listCtrl=( "wx.TextCtrl(panel, -1, value)", ( "eg.SpinNumCtrl(panel,-1,value,max=100.0,min=0.0," "fractionWidth=1,increment=10,style=wx.TE_READONLY)" ) ) self.propertiesList=( ("Tempo",0,False), ("Mood",0,False), ("Occasion",0,False), ("Quality",0,False), ("Custom1",0,False), ("Custom2",0,False), ("Custom3",0,False), ("Custom4",0,False), ("Custom5",0,False), ("Comment",0,True), ("Genre",0,True), ("Rating",1,True), )
Example #9
Source File: GuiAbsBase.py From Crypter with GNU General Public License v3.0 | 6 votes |
def __init__( self, parent ): wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Encrypted Files", pos = wx.DefaultPosition, size = wx.Size( 600,400 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL ) self.SetSizeHints( wx.DefaultSize, wx.DefaultSize ) BodySizer = wx.BoxSizer( wx.VERTICAL ) self.m_panel4 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) TextCtrlSizer = wx.BoxSizer( wx.VERTICAL ) self.EncryptedFilesTextCtrl = wx.TextCtrl( self.m_panel4, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_DONTWRAP|wx.TE_MULTILINE|wx.TE_READONLY ) TextCtrlSizer.Add( self.EncryptedFilesTextCtrl, 1, wx.ALL|wx.EXPAND, 5 ) self.m_panel4.SetSizer( TextCtrlSizer ) self.m_panel4.Layout() TextCtrlSizer.Fit( self.m_panel4 ) BodySizer.Add( self.m_panel4, 1, wx.EXPAND |wx.ALL, 5 ) self.SetSizer( BodySizer ) self.Layout() self.Centre( wx.BOTH )
Example #10
Source File: UsbConnect.py From meerk40t with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: Terminal.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_NO_TASKBAR | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((915, 424)) self.text_main = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY) self.text_entry = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT_ENTER, self.on_entry, self.text_entry) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self) self.pipe = None
Example #11
Source File: Terminal.py From meerk40t with MIT License | 6 votes |
def __init__(self, *args, **kwds): # begin wxGlade: Terminal.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_NO_TASKBAR | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP wx.Frame.__init__(self, *args, **kwds) Module.__init__(self) self.SetSize((581, 410)) self.text_main = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_BESTWRAP | wx.TE_MULTILINE | wx.TE_READONLY) self.text_entry = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB) self.__set_properties() self.__do_layout() # self.Bind(wx.EVT_TEXT, self.on_key_down, self.text_entry) self.Bind(wx.EVT_CHAR_HOOK, self.on_key_down, self.text_entry) self.Bind(wx.EVT_TEXT_ENTER, self.on_entry, self.text_entry) # end wxGlade self.Bind(wx.EVT_CLOSE, self.on_close, self) self.pipe = None self.command_log = [] self.command_position = 0
Example #12
Source File: guiminer.py From poclbm with GNU General Public License v3.0 | 6 votes |
def __init__(self, parent, n_max_lines): wx.Panel.__init__(self, parent, -1) self.parent = parent self.n_max_lines = n_max_lines vbox = wx.BoxSizer(wx.VERTICAL) style = wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL self.text = wx.TextCtrl(self, -1, "", style=style) vbox.Add(self.text, 1, wx.EXPAND) self.SetSizer(vbox) self.handler = logging.StreamHandler(self) formatter = logging.Formatter("%(asctime)s: %(message)s", "%Y-%m-%d %H:%M:%S") self.handler.setFormatter(formatter) logger.addHandler(self.handler)
Example #13
Source File: gui.py From report-ng with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent, content='', *args, **kwargs): GUI.ChildWindow.__init__(self, parent, *args, **kwargs) tc = wx.TextCtrl(self, style=wx.TE_MULTILINE | wx.TE_READONLY) def tc_OnChar(e): keyInput = e.GetKeyCode() if keyInput == 1: # Ctrl+A tc.SelectAll() else: e.Skip() tc.Bind(wx.EVT_CHAR, tc_OnChar) def tc_OnFocus(e): tc.ShowNativeCaret(False) e.Skip() tc.Bind(wx.EVT_SET_FOCUS, tc_OnFocus) tc.SetValue(content) #self.Center() self.CenterOnScreen() self.Show()
Example #14
Source File: AboutDialog.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
def __init__(self, parent, info): wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400), style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) if parent and parent.GetIcon(): self.SetIcon(parent.GetIcon()) self.SetMinSize((400, 300)) close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close")) ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE) ctrl.SetValue(info.License) btnSizer = wx.BoxSizer(wx.HORIZONTAL) btnSizer.Add(close) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(ctrl, 1, wx.EXPAND | wx.ALL, 10) sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10) self.SetSizer(sizer) self.Layout() self.Show() self.SetEscapeId(close.GetId()) close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
Example #15
Source File: dialogs.py From NVDARemote with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent=None, id=wx.ID_ANY): super().__init__(parent, id) sizer = wx.BoxSizer(wx.HORIZONTAL) # Translators: Used in server mode to obtain the external IP address for the server (controlled computer) for direct connection. self.get_IP = wx.Button(parent=self, label=_("Get External &IP")) self.get_IP.Bind(wx.EVT_BUTTON, self.on_get_IP) sizer.Add(self.get_IP) # Translators: Label of the field displaying the external IP address if using direct (client to server) connection. sizer.Add(wx.StaticText(self, wx.ID_ANY, label=_("&External IP:"))) self.external_IP = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_READONLY|wx.TE_MULTILINE) sizer.Add(self.external_IP) # Translators: The label of an edit field in connect dialog to enter the port the server will listen on. sizer.Add(wx.StaticText(self, wx.ID_ANY, label=_("&Port:"))) self.port = wx.TextCtrl(self, wx.ID_ANY, value=str(socket_utils.SERVER_PORT)) sizer.Add(self.port) sizer.Add(wx.StaticText(self, wx.ID_ANY, label=_("&Key:"))) self.key = wx.TextCtrl(self, wx.ID_ANY) sizer.Add(self.key) self.generate_key = wx.Button(parent=self, label=_("&Generate Key")) self.generate_key.Bind(wx.EVT_BUTTON, self.on_generate_key) sizer.Add(self.generate_key) self.SetSizerAndFit(sizer)
Example #16
Source File: StaticTextBox.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def __init__(self, parent, id=-1, label='', pos=(-1, -1), size=(-1, -1)): wx.PyWindow.__init__( self, parent, id, pos, size, style=wx.SUNKEN_BORDER ) self.SetMinSize(self.GetSize()) sizer = wx.BoxSizer(wx.VERTICAL) textCtrl = wx.TextCtrl( self, -1, label, style=( wx.TE_MULTILINE | wx.TE_NO_VSCROLL | wx.NO_BORDER | wx.TE_READONLY ) ) textCtrl.SetBackgroundColour(self.GetBackgroundColour()) #sizer.Add((0,0), 1, wx.EXPAND) sizer.Add(textCtrl, 0, wx.EXPAND | wx.ALL, 3) sizer.Add((0, 0), 1, wx.EXPAND) self.SetSizer(sizer) self.Bind(wx.EVT_SIZE, self.OnSize) self.textCtrl = textCtrl
Example #17
Source File: main_frame.py From Rule-based_Expert_System with GNU General Public License v2.0 | 5 votes |
def __init__(self, parent, id, title, size): wx.Frame.__init__(self, parent, id, title, style=wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER | wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX)) self.SetSize(size) self.Center() self.sourceLabel = wx.StaticText(self, label='Source Image', pos=(150, 10), size=(40, 25)) self.detectionLabel = wx.StaticText(self, label='Detection Image', pos=(550, 10), size=(40, 25)) self.openPicButton = wx.Button(self, label='Open Image', pos=(830, 30), size=(150, 30)) self.openPicButton.Bind(wx.EVT_BUTTON, self.open_picture) self.openEditorButton = wx.Button(self, label='Open Rule Editor', pos=(830, 70), size=(150, 30)) self.openEditorButton.Bind(wx.EVT_BUTTON, self.open_rule_editor) self.showRuleButton = wx.Button(self, label='Show Rules', pos=(830, 110), size=(150, 30)) self.showRuleButton.Bind(wx.EVT_BUTTON, self.show_rules) self.showFactButton = wx.Button(self, label='Show Facts', pos=(830, 150), size=(150, 30)) self.showFactButton.Bind(wx.EVT_BUTTON, self.show_facts) self.treeLabel = wx.StaticText(self, label='What shape do you want', pos=(830, 200), size=(40, 25)) self.shapeTree = wx.TreeCtrl(self, pos=(830, 220), size=(160, 210)) root = self.shapeTree.AddRoot('All Shapes') self.add_tree_nodes(root, shape_items.tree) self.shapeTree.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.shape_chosen) self.shapeTree.Expand(root) self.show_picture('init_source.png', (10, 30)) self.show_picture('init_detection.png', (420, 30)) self.resultLabel = wx.StaticText(self, label='Detection Result', pos=(100, 450), size=(40, 25)) self.resultText = wx.TextCtrl(self, pos=(10, 480), size=(310, 280), style=wx.TE_MULTILINE | wx.TE_READONLY) self.matchedFactLabel = wx.StaticText(self, label='Matched Facts', pos=(430, 450), size=(40, 25)) self.matchedFactText = wx.TextCtrl(self, pos=(340, 480), size=(310, 280), style=wx.TE_MULTILINE | wx.TE_READONLY) self.hitRuleLabel = wx.StaticText(self, label='Hit Rules', pos=(780, 450), size=(40, 25)) self.hitRuleText = wx.TextCtrl(self, pos=(670, 480), size=(310, 280), style=wx.TE_MULTILINE | wx.TE_READONLY) self.title = title self.pic_path = None self.engine = None self.contour_num = None self.Show()
Example #18
Source File: main_frame.py From Rule-based_Expert_System with GNU General Public License v2.0 | 5 votes |
def __init__(self, parent, id, title, text): wx.Frame.__init__(self, parent, id, title, style=wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER | wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX)) self.SetSize((400, 780)) self.SetPosition((600, 0)) self.factText = wx.TextCtrl(self, pos=(0, 0), size=(400, 780), style=wx.TE_MULTILINE | wx.TE_READONLY) self.factText.WriteText(text)
Example #19
Source File: AboutDialog.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
def __init__(self, parent, info): wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320), style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) if parent and parent.GetIcon(): self.SetIcon(parent.GetIcon()) self.SetMinSize((300, 200)) notebook = wx.Notebook(self) close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close")) close.SetDefault() developer = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE) translators = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE) developer.SetValue(u'\n'.join(info.Developers)) translators.SetValue(u'\n'.join(info.Translators)) notebook.AddPage(developer, text=_("Written by")) notebook.AddPage(translators, text=_("Translated by")) btnSizer = wx.BoxSizer(wx.HORIZONTAL) btnSizer.Add(close) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(notebook, 1, wx.EXPAND | wx.ALL, 10) sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10) self.SetSizer(sizer) self.Layout() self.Show() self.SetEscapeId(close.GetId()) close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
Example #20
Source File: main_frame.py From Rule-based_Expert_System with GNU General Public License v2.0 | 5 votes |
def __init__(self, parent, id, title, text): wx.Frame.__init__(self, parent, id, title, style=wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER | wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX)) self.SetSize((400, 780)) self.SetPosition((200, 0)) self.ruleText = wx.TextCtrl(self, pos=(0, 0), size=(400, 780), style=wx.TE_MULTILINE | wx.TE_READONLY) self.ruleText.WriteText(text)
Example #21
Source File: runtime_display_panel.py From me-ica with GNU Lesser General Public License v2.1 | 5 votes |
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 #22
Source File: viewer.py From dials with BSD 3-Clause "New" or "Revised" License | 5 votes |
def add_value_widgets(self, sizer): sizer.Add( wx.StaticText(self.panel, -1, "Value:"), 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5, ) self.value_info = wx.TextCtrl( self.panel, -1, size=(80, -1), style=wx.TE_READONLY ) sizer.Add(self.value_info, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)
Example #23
Source File: py_shell_example.py From wxGlade with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MyFrame.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.SetSize((800, 379)) self.SetTitle("frame") sizer_1 = wx.BoxSizer(wx.VERTICAL) self.panel_1 = wx.Panel(self, wx.ID_ANY) sizer_1.Add(self.panel_1, 1, wx.EXPAND, 0) sizer_2 = wx.BoxSizer(wx.VERTICAL) self.text_ctrl = wx.TextCtrl(self.panel_1, wx.ID_ANY, "This is text_ctrl.\n\nUse the shell to append text here.\nE.g. enter this:\napp.frame.text_ctrl.AppendText(\"line of text\\n\")\n", style=wx.TE_MULTILINE | wx.TE_READONLY) self.text_ctrl.SetMinSize((200, 10)) self.text_ctrl.SetBackgroundColour(wx.Colour(192, 192, 192)) sizer_2.Add(self.text_ctrl, 1, wx.ALL | wx.EXPAND, 1) self.shell = wx.py.shell.Shell(self.panel_1, wx.ID_ANY, introText = "\nThis is the shell.\nHave a look at the variables 'app' and 'app.frame'.\n\n") sizer_2.Add(self.shell, 2, wx.EXPAND, 0) self.panel_1.SetSizer(sizer_2) self.SetSizer(sizer_1) self.Layout() # end wxGlade # end of class MyFrame
Example #24
Source File: APDUTracerPanel.py From pyscard with GNU Lesser General Public License v2.1 | 5 votes |
def __init__(self, parent): wx.Panel.__init__(self, parent, -1) boxsizer = wx.BoxSizer(wx.HORIZONTAL) self.apdutextctrl = wx.TextCtrl( self, wxID_APDUTEXTCTRL, "", pos=wx.DefaultPosition, style=wx.TE_MULTILINE | wx.TE_READONLY) boxsizer.Add(self.apdutextctrl, 1, wx.EXPAND | wx.ALL, 5) self.SetSizer(boxsizer) self.SetAutoLayout(True) self.Bind(wx.EVT_TEXT_MAXLEN, self.OnMaxLength, self.apdutextctrl)
Example #25
Source File: filmow_to_letterboxd.py From filmow_to_letterboxd with MIT License | 5 votes |
def Submit(self, event): self.button = event.GetEventObject() self.button.Disable() self.text_control = wx.TextCtrl( self.panel, -1, '', pos=(50, 120), size=(400, 100), style=wx.TE_MULTILINE | wx.TE_CENTRE | wx.TE_READONLY | wx.TE_NO_VSCROLL | wx.TE_AUTO_URL | wx.TE_RICH2 | wx.BORDER_NONE ) self.Parse(self.MyFrame)
Example #26
Source File: dialog.py From wxGlade with MIT License | 5 votes |
def __init__(self, *args, **kwds): # begin wxGlade: MyFrame.__init__ kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.SetSize((400, 300)) self.SetTitle("frame") self.panel_1 = wx.Panel(self, wx.ID_ANY) sizer_1 = wx.BoxSizer(wx.VERTICAL) self.button_1 = wx.Button(self.panel_1, wx.ID_ANY, "Show Dialog (modal)") sizer_1.Add(self.button_1, 0, wx.ALL, 4) static_text_1 = wx.StaticText(self.panel_1, wx.ID_ANY, "Text from dialog:") sizer_1.Add(static_text_1, 0, wx.ALL, 4) self.text_ctrl_1 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_READONLY) sizer_1.Add(self.text_ctrl_1, 0, wx.ALL | wx.EXPAND, 4) self.panel_1.SetSizer(sizer_1) self.Layout() self.Bind(wx.EVT_BUTTON, self.on_button_show_modal, self.button_1) # end wxGlade
Example #27
Source File: optionsframe.py From youtube-dl-gui with The Unlicense | 5 votes |
def __init__(self, parent=None): wx.Frame.__init__(self, parent, title=self.TITLE, size=self.FRAME_SIZE) panel = wx.Panel(self) self._text_area = wx.TextCtrl( panel, style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL ) sizer = wx.BoxSizer() sizer.Add(self._text_area, 1, wx.EXPAND) panel.SetSizerAndFit(sizer)
Example #28
Source File: basictextconsole.py From Gooey with MIT License | 5 votes |
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 #29
Source File: textarea.py From Gooey with MIT License | 5 votes |
def getModifiers(self): readonly = (wx.TE_READONLY if self._options.get('readonly', False) # using TE_MUTLI as a safe OR-able no-op value else wx.TE_MULTILINE) return reduce(lambda acc, val: acc | val, [wx.TE_MULTILINE, readonly])
Example #30
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def get_description(self): txt_style = wx.VSCROLL | \ wx.HSCROLL | wx.TE_READONLY | \ wx.BORDER_SIMPLE htmlw = html.HtmlWindow(self, wx.ID_ANY, size=(280, 208), style=txt_style) htmlw.SetPage(self.DESCRIPTION) return htmlw