Python wx.HSCROLL Examples
The following are 16
code examples of wx.HSCROLL().
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: 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 #2
Source File: pdfviewer(wx).py From PyMuPDF-Utilities with GNU General Public License v3.0 | 6 votes |
def __init__(self, parent, **kwds): super(PDFViewer, self).__init__(parent, **kwds) paneCont = self.GetContentsPane() self.buttonpanel = pdfButtonPanel(paneCont, wx.NewId(), wx.DefaultPosition, wx.DefaultSize, 0) self.buttonpanel.SetSizerProps(expand=True) self.viewer = pdfViewer(paneCont, wx.NewId(), wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL|wx.SUNKEN_BORDER) self.viewer.SetSizerProps(expand=True, proportion=1) # introduce buttonpanel and viewer to each other self.buttonpanel.viewer = self.viewer self.viewer.buttonpanel = self.buttonpanel
Example #3
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 #4
Source File: ConfigEditor.py From OpenPLC_Editor with GNU General Public License v3.0 | 6 votes |
def _create_ModuleLibraryEditor(self, prnt): self.ModuleLibraryEditor = wx.ScrolledWindow(prnt, style=wx.TAB_TRAVERSAL | wx.HSCROLL | wx.VSCROLL) self.ModuleLibraryEditor.Bind(wx.EVT_SIZE, self.OnResize) self.ModuleLibrarySizer = LibraryEditorSizer( self.ModuleLibraryEditor, self.Controler.GetModulesLibraryInstance(), [ ("ImportButton", "ImportESI", _("Import ESI file"), None), ("AddButton", "ImportDatabase", _("Add file from ESI files database"), self.OnAddButton), ("DeleteButton", "remove_element", _("Remove file from library"), None) ]) self.ModuleLibrarySizer.SetControlMinSize(wx.Size(0, 200)) self.ModuleLibraryEditor.SetSizer(self.ModuleLibrarySizer) return self.ModuleLibraryEditor
Example #5
Source File: metapage.py From magpy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def createControls(self): self.head1Label = wx.StaticText(self, label="Basic Information:") self.head2Label = wx.StaticText(self, label="Database:") self.head3Label = wx.StaticText(self, label="Modify/Review:") # 1. Section self.samplingrateLabel = wx.StaticText(self, label="Samp. period (sec):") self.samplingrateTextCtrl = wx.TextCtrl(self, value="--",size=(160,30)) self.amountLabel = wx.StaticText(self, label="N of data point:") self.amountTextCtrl = wx.TextCtrl(self, value="--",size=(160,30)) self.typeLabel = wx.StaticText(self, label="Datatype:") self.typeTextCtrl = wx.TextCtrl(self, value="--",size=(160,30)) self.keysLabel = wx.StaticText(self, label="Used keys:") self.keysTextCtrl = wx.TextCtrl(self, value="--",size=(160,30)) self.samplingrateTextCtrl.Disable() self.amountTextCtrl.Disable() self.typeTextCtrl.Disable() self.keysTextCtrl.Disable() self.getDBButton = wx.Button(self,-1,"Get from DB",size=(160,30)) self.putDBButton = wx.Button(self,-1,"Write to DB",size=(160,30)) self.MetaDataButton = wx.Button(self,-1,"Data related",size=(160,30)) self.dataTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,80), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.MetaSensorButton = wx.Button(self,-1,"Sensor related",size=(160,30)) self.sensorTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,80), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.MetaStationButton = wx.Button(self,-1,"Station related",size=(160,30)) self.stationTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,80), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
Example #6
Source File: absolutespage.py From magpy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def createControls(self): self.sourceLabel = wx.StaticText(self, label="Data source:") self.diLabel = wx.StaticText(self, label="Actions:") self.loadDIButton = wx.Button(self,-1,"DI data",size=(160,30)) self.diSourceLabel = wx.StaticText(self, label="Source: None") self.diTextCtrl = wx.TextCtrl(self, value="None",size=(160,40), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.defineVarioScalarButton = wx.Button(self,-1,"Vario/Scalar",size=(160,30)) self.VarioSourceLabel = wx.StaticText(self, label="Vario: None") self.ScalarSourceLabel = wx.StaticText(self, label="Scalar: None") self.varioTextCtrl = wx.TextCtrl(self, value="None",size=(160,40), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.defineParameterButton = wx.Button(self,-1,"Analysis parameter",size=(160,30)) self.parameterRadioBox = wx.RadioBox(self,label="parameter source",choices=self.choices, majorDimension=2, style=wx.RA_SPECIFY_COLS,size=(160,50)) #self.parameterTextCtrl = wx.TextCtrl(self, value="Default",size=(160,30), # style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.scalarTextCtrl = wx.TextCtrl(self, value="None",size=(160,40), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.AnalyzeButton = wx.Button(self,-1,"Analyze",size=(160,30)) self.logLabel = wx.StaticText(self, label="Logging:") #self.exportButton = wx.Button(self,-1,"Export...",size=(160,30)) self.ClearLogButton = wx.Button(self,-1,"Clear Log",size=(160,30)) self.SaveLogButton = wx.Button(self,-1,"Save Log",size=(160,30)) self.dilogTextCtrl = wx.TextCtrl(self, wx.ID_ANY, size=(330,200), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) #self.varioExtComboBox = wx.ComboBox(self, choices=self.varioext, # style=wx.CB_DROPDOWN, value=self.varioext[0],size=(160,-1)) #self.scalarExtComboBox = wx.ComboBox(self, choices=self.scalarext, # style=wx.CB_DROPDOWN, value=self.scalarext[0],size=(160,-1))
Example #7
Source File: statisticspage.py From magpy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def createControls(self): self.statisticsLabel = wx.StaticText(self, label="Statistics:") self.timeLabel = wx.StaticText(self, label="") self.statisticsTextCtrl = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.valuesLabel = wx.StaticText(self, label="Individual Values (For ten or less data points):") self.valuesTextCtrl = wx.TextCtrl(self, wx.ID_ANY, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL)
Example #8
Source File: reportpage.py From magpy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def createControls(self): self.logger = wx.TextCtrl(self, wx.ID_ANY, size=(330,400), style = wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.VSCROLL) self.saveLoggerButton = wx.Button(self,-1,"Save log",size=(160,30))
Example #9
Source File: monitorpage.py From magpy with BSD 3-Clause "New" or "Revised" License | 5 votes |
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 #10
Source File: sct_plugin.py From spinalcordtoolbox with MIT License | 5 votes |
def __init__(self, parent, id_): super(SCTPanel, self).__init__(parent=parent, id=id_) # Logo self.img_logo = self.get_logo() self.sizer_logo_sct = wx.BoxSizer(wx.VERTICAL) self.sizer_logo_sct.Add(self.img_logo, 0, wx.ALL, 5) # Citation txt_sct_citation = wx.VSCROLL | \ wx.HSCROLL | wx.TE_READONLY | \ wx.BORDER_SIMPLE html_sct_citation = html.HtmlWindow(self, wx.ID_ANY, size=(280, 115), style=txt_sct_citation) html_sct_citation.SetPage(self.DESCRIPTION_SCT) self.sizer_logo_sct.Add(html_sct_citation, 0, wx.ALL, 5) # Help button button_help = wx.Button(self, id=id_, label="Help") button_help.Bind(wx.EVT_BUTTON, self.tutorial) self.sizer_logo_sct.Add(button_help, 0, wx.ALL, 5) # Get function-specific description self.html_desc = self.get_description() # Organize boxes self.sizer_logo_text = wx.BoxSizer(wx.HORIZONTAL) # create main box self.sizer_logo_text.Add(self.sizer_logo_sct, 0, wx.ALL, 5) # TODO: increase the width of the description box self.sizer_logo_text.Add(self.html_desc, 0, wx.ALL, 5) self.sizer_h = wx.BoxSizer(wx.HORIZONTAL) self.sizer_h.Add(self.sizer_logo_text)
Example #11
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
Example #12
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 #13
Source File: ConfigEditor.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
def _create_EtherCATManagementEditor(self, prnt): self.EtherCATManagementEditor = wx.ScrolledWindow(prnt, style=wx.TAB_TRAVERSAL | wx.HSCROLL | wx.VSCROLL) self.EtherCATManagementEditor.Bind(wx.EVT_SIZE, self.OnResize) self.EtherCATManagermentEditor_Main_Sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5) self.EtherCATManagermentEditor_Main_Sizer.AddGrowableCol(0) self.EtherCATManagermentEditor_Main_Sizer.AddGrowableRow(0) self.EtherCATManagementTreebook = EtherCATManagementTreebook(self.EtherCATManagementEditor, self.Controler, self) self.EtherCATManagermentEditor_Main_Sizer.AddSizer(self.EtherCATManagementTreebook, border=10, flag=wx.GROW) self.EtherCATManagementEditor.SetSizer(self.EtherCATManagermentEditor_Main_Sizer) return self.EtherCATManagementEditor
Example #14
Source File: ConfigEditor.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
def _create_MasterStateEditor(self, prnt): self.MasterStateEditor = wx.ScrolledWindow(prnt, style=wx.TAB_TRAVERSAL | wx.HSCROLL | wx.VSCROLL) self.MasterStateEditor.Bind(wx.EVT_SIZE, self.OnResize) self.MasterStateEditor_Panel_Main_Sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5) self.MasterStateEditor_Panel_Main_Sizer.AddGrowableCol(0) self.MasterStateEditor_Panel_Main_Sizer.AddGrowableRow(0) self.MasterStateEditor_Panel = MasterStatePanelClass(self.MasterStateEditor, self.Controler) self.MasterStateEditor_Panel_Main_Sizer.AddSizer(self.MasterStateEditor_Panel, border=10, flag=wx.GROW) self.MasterStateEditor.SetSizer(self.MasterStateEditor_Panel_Main_Sizer) return self.MasterStateEditor
Example #15
Source File: Viewer.py From OpenPLC_Editor with GNU General Public License v3.0 | 5 votes |
def _init_Editor(self, prnt): self.Editor = wx.ScrolledWindow(prnt, name="Viewer", pos=wx.Point(0, 0), size=wx.Size(0, 0), style=wx.HSCROLL | wx.VSCROLL) self.Editor.ParentWindow = self # Create a new Viewer
Example #16
Source File: autosetup_tty.py From openplotter with GNU General Public License v2.0 | 4 votes |
def __init__(self): self.serial = 0 self.conf = Conf() Language(self.conf) wx.Frame.__init__(self, None, wx.ID_ANY, _('tty auto setup'), size=(720, 350)) # Add a panel so it looks the correct on all platforms panel = wx.Panel(self, wx.ID_ANY) log = wx.TextCtrl(panel, wx.ID_ANY, style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL) self.autostart = wx.CheckBox(panel, label=_('setup autostart on every boot')) self.autostart.Bind(wx.EVT_CHECKBOX, self.on_autostart) setup = wx.Button(panel, wx.ID_ANY, 'setup') setup.Bind(wx.EVT_BUTTON, on_setup) close = wx.Button(panel, wx.ID_CLOSE) close.Bind(wx.EVT_BUTTON, self.on_close) # Add widgets to a sizer hbox = wx.BoxSizer(wx.HORIZONTAL) hbox.Add(self.autostart, 0, wx.ALL | wx.EXPAND, 5) hbox.Add((0, 0), 1, wx.ALL | wx.EXPAND, 5) hbox.Add(setup, 0, wx.ALL | wx.EXPAND, 5) hbox.Add(close, 0, wx.ALL | wx.EXPAND, 5) vbox = wx.BoxSizer(wx.VERTICAL) vbox.Add(log, 1, wx.ALL | wx.EXPAND, 5) vbox.Add(hbox, 0, wx.ALL | wx.CENTER | wx.EXPAND, 5) panel.SetSizer(vbox) self.tool_list = [] data = self.conf.get('TOOLS', 'py') try: temp_list = eval(data) except: temp_list = [] for ii in temp_list: self.tool_list.append(ii) self.tool = [] self.tool_exist = False for i in self.tool_list: if i[2] == 'autosetup_tty.py': self.autostart.SetValue(i[3] == '1') self.tool.append(i) self.tool_exist = True # redirect text here redir = RedirectText(log) sys.stdout = redir print _('Auto setup detects hardware. Please make sure that all devices are turned on.') print