本文整理汇总了Python中wx.VSCROLL属性的典型用法代码示例。如果您正苦于以下问题:Python wx.VSCROLL属性的具体用法?Python wx.VSCROLL怎么用?Python wx.VSCROLL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.VSCROLL属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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")
示例2: _create_ModuleLibraryEditor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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
示例3: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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)
#----------------------------------------------------------------------------
示例4: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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)
示例5: get_description
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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)
示例7: _create_EtherCATManagementEditor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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
示例8: _create_MasterStateEditor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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
示例9: _init_Editor
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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
示例10: _init_ctrls
# 需要导入模块: import wx [as 别名]
# 或者: from wx import VSCROLL [as 别名]
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()