Python wx.VSCROLL Examples
The following are 10
code examples of wx.VSCROLL().
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: NamespaceTree.py From EventGhost with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent, namespace): self.namespace = namespace wx.gizmos.TreeListCtrl.__init__( self, parent, style=( wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_DEFAULT_STYLE | wx.VSCROLL | wx.ALWAYS_SHOW_SB #| #wx.CLIP_CHILDREN ) ) self.AddColumn("Name") self.AddColumn("Type") self.AddColumn("Value")
Example #2
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 #3
Source File: CellEditor.py From bookhub with MIT License | 6 votes |
def __init__(self, olv, subItemIndex, **kwargs): style = wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB # Allow for odd case where parent isn't an ObjectListView if hasattr(olv, "columns"): if olv.HasFlag(wx.LC_ICON): style |= (wx.TE_CENTRE | wx.TE_MULTILINE) else: style |= olv.columns[subItemIndex].GetAlignmentForText() wx.TextCtrl.__init__(self, olv, style=style, size=(0,0), **kwargs) # With the MULTILINE flag, the text control always has a vertical # scrollbar, which looks stupid. I don't know how to get rid of it. # This doesn't do it: # self.ToggleWindowStyle(wx.VSCROLL) #----------------------------------------------------------------------------
Example #4
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 #5
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 #6
Source File: __init__.py From EventGhost with GNU General Public License v2.0 | 5 votes |
def __init__(self, parent, text, menuData, selectedItem=None): self.highestMenuId = 0 wx.gizmos.TreeListCtrl.__init__( self, parent, style = wx.TR_FULL_ROW_HIGHLIGHT |wx.TR_DEFAULT_STYLE |wx.VSCROLL |wx.ALWAYS_SHOW_SB |wx.CLIP_CHILDREN ) self.SetMinSize((10, 150)) self.AddColumn(text.labelHeader) self.AddColumn(text.eventHeader) root = self.AddRoot(text.name) for data in menuData: name, kind, eventName, menuId = data if menuId > self.highestMenuId: self.highestMenuId = menuId eventName = data[2] item = self.AppendItem(root, name) self.SetItemText(item, eventName, 1) self.SetPyData(item, data) if menuId == selectedItem: self.SelectItem(item) self.SetColumnWidth(0, 200) self.ExpandAll(root) self.__inSizing = False self.GetMainWindow().Bind(wx.EVT_SIZE, self.OnSize)
Example #7
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 #8
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 #9
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 #10
Source File: commondialogs.py From CANFestivino with GNU Lesser General Public License v2.1 | 4 votes |
def _init_ctrls(self, prnt): wx.Dialog.__init__(self, id=ID_DCFENTRYVALUESDIALOG, name='DCFEntryValuesDialog', parent=prnt, pos=wx.Point(376, 223), size=wx.Size(400, 300), style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER, title=_('Edit DCF Entry Values')) self.SetClientSize(wx.Size(400, 300)) self.staticText1 = wx.StaticText(id=ID_VARIABLEEDITORPANELSTATICTEXT1, label=_('Entry Values:'), name='staticText1', parent=self, pos=wx.Point(0, 0), size=wx.Size(95, 17), style=0) self.ValuesGrid = wx.grid.Grid(id=ID_DCFENTRYVALUESDIALOGVALUESGRID, name='ValuesGrid', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 150), style=wx.VSCROLL) self.ValuesGrid.SetFont(wx.Font(12, 77, wx.NORMAL, wx.NORMAL, False, 'Sans')) self.ValuesGrid.SetLabelFont(wx.Font(10, 77, wx.NORMAL, wx.NORMAL, False, 'Sans')) self.ValuesGrid.SetRowLabelSize(0) self.ValuesGrid.SetSelectionBackground(wx.WHITE) self.ValuesGrid.SetSelectionForeground(wx.BLACK) if wx.VERSION >= (2, 6, 0): self.ValuesGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGE, self.OnValuesGridCellChange) self.ValuesGrid.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnValuesGridSelectCell) else: wx.grid.EVT_GRID_CELL_CHANGE(self.ValuesGrid, self.OnValuesGridCellChange) wx.grid.EVT_GRID_SELECT_CELL(self.ValuesGrid, self.OnValuesGridSelectCell) self.AddButton = wx.Button(id=ID_DCFENTRYVALUESDIALOGADDBUTTON, label=_('Add'), name='AddButton', parent=self, pos=wx.Point(0, 0), size=wx.Size(72, 32), style=0) self.Bind(wx.EVT_BUTTON, self.OnAddButton, id=ID_DCFENTRYVALUESDIALOGADDBUTTON) self.DeleteButton = wx.Button(id=ID_DCFENTRYVALUESDIALOGDELETEBUTTON, label=_('Delete'), name='DeleteButton', parent=self, pos=wx.Point(0, 0), size=wx.Size(72, 32), style=0) self.Bind(wx.EVT_BUTTON, self.OnDeleteButton, id=ID_DCFENTRYVALUESDIALOGDELETEBUTTON) self.UpButton = wx.Button(id=ID_DCFENTRYVALUESDIALOGUPBUTTON, label='^', name='UpButton', parent=self, pos=wx.Point(0, 0), size=wx.Size(32, 32), style=0) self.Bind(wx.EVT_BUTTON, self.OnUpButton, id=ID_DCFENTRYVALUESDIALOGUPBUTTON) self.DownButton = wx.Button(id=ID_DCFENTRYVALUESDIALOGDOWNBUTTON, label='v', name='DownButton', parent=self, pos=wx.Point(0, 0), size=wx.Size(32, 32), style=0) self.Bind(wx.EVT_BUTTON, self.OnDownButton, id=ID_DCFENTRYVALUESDIALOGDOWNBUTTON) self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE) self._init_sizers()