本文整理汇总了Python中wx.LC_VRULES属性的典型用法代码示例。如果您正苦于以下问题:Python wx.LC_VRULES属性的具体用法?Python wx.LC_VRULES怎么用?Python wx.LC_VRULES使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.LC_VRULES属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(self, parent):
wx.ListCtrl.__init__(self, parent, -1,
style = wx.LC_REPORT | wx.LC_VIRTUAL | wx.LC_SINGLE_SEL |
wx.LC_HRULES | wx.LC_VRULES)
self.sex = ["Female", "Male"]
self.InsertColumn(0, "Name")
self.InsertColumn(1, "Type")
self.InsertColumn(2, "Sex")
self.SetColumnWidth(0, 120)
self.SetColumnWidth(1, 120)
# we can't use wx.LIST_AUTOSIZE since this is a virtual control,
# so calculate the size ourselves since we know the longest string
# possible.
w = util.getTextExtent(self.GetFont(), "Female")[0] + 15
self.SetColumnWidth(2, w)
util.setWH(self, w = 120*2 + w + 25)
示例2: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(
self, parent,
id=-1,
pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.LC_REPORT|wx.LC_VIRTUAL|wx.LC_VRULES|wx.LC_SINGLE_SEL,
validator=wx.DefaultValidator,
columns=None,
sortOrder=None,
name=_("ProfileView"),
):
wx.ListCtrl.__init__(self, parent, id, pos, size, style, validator,
name)
if columns is not None:
self.columns = columns
if not sortOrder:
sortOrder = [(x.defaultOrder,x) for x in self.columns if x.sortDefault]
self.sortOrder = sortOrder or []
self.sorted = []
self.CreateControls()
示例3: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
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")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
self.list_ctrl_1 = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.list_ctrl_1.InsertColumn(0, "A", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(1, "B", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(2, "C", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.InsertColumn(3, "D", format=wx.LIST_FORMAT_LEFT, width=-1)
sizer_1.Add(self.list_ctrl_1, 1, wx.EXPAND, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyFrame
示例4: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
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")
sizer_1 = wx.BoxSizer(wx.VERTICAL)
self.list_ctrl_1 = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.list_ctrl_1.AppendColumn("A", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.AppendColumn("B", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.AppendColumn("C", format=wx.LIST_FORMAT_LEFT, width=-1)
self.list_ctrl_1.AppendColumn("D", format=wx.LIST_FORMAT_LEFT, width=-1)
sizer_1.Add(self.list_ctrl_1, 1, wx.EXPAND, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
# end of class MyFrame
示例5: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(self, parent, pos, size = wx.DefaultSize):
ID = wx.NewId()
style = wx.LC_REPORT | wx.LC_VRULES | wx.LC_HRULES | wx.LC_SINGLE_SEL
wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
mons = [(i[0], i[1], i[2] - i[0], i[3] - i[1]) for i in [j[2] for j in Edm()]]
for j, header in enumerate(eg.text.General.monitorsHeader):
self.InsertColumn(j, header, wx.LIST_FORMAT_RIGHT)
self.SetColumnWidth(j, wx.LIST_AUTOSIZE_USEHEADER)
for i, mon in enumerate(mons):
self.InsertStringItem(i, str(i + 1))
self.SetStringItem(i, 1, str(mon[0]))
self.SetStringItem(i, 2, str(mon[1]))
self.SetStringItem(i, 3, str(mon[2]))
self.SetStringItem(i, 4, str(mon[3]))
rect = self.GetItemRect(0, wx.LIST_RECT_BOUNDS)
self.hh = rect[1] #header height
self.ih = rect[3] #item height
size = self.GetRealSize()
self.SetMinSize(size)
self.SetSize(size)
示例6: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: JobSpooler.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
wx.Frame.__init__(self, *args, **kwds)
Module.__init__(self)
self.SetSize((661, 402))
self.list_job_spool = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_LIST_BEGIN_DRAG, self.on_list_drag, self.list_job_spool)
self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.on_item_rightclick, self.list_job_spool)
# end wxGlade
self.dirty = False
self.update_buffer_size = False
self.update_spooler_state = False
self.update_spooler = False
self.elements_progress = 0
self.elements_progress_total = 0
self.command_index = 0
self.listener_list = None
self.list_lookup = {}
self.Bind(wx.EVT_CLOSE, self.on_close, self)
示例7: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: Keymap.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
wx.Frame.__init__(self, *args, **kwds)
Module.__init__(self)
self.SetSize((500, 530))
self.list_keymap = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.button_add = wx.Button(self, wx.ID_ANY, _("Add Hotkey"))
self.text_key_name = wx.TextCtrl(self, wx.ID_ANY, "")
self.text_command_name = wx.TextCtrl(self, wx.ID_ANY, "")
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.on_button_add_hotkey, self.button_add)
# end wxGlade
self.Bind(wx.EVT_CLOSE, self.on_close, self)
self.text_key_name.Bind(wx.EVT_KEY_DOWN, self.on_key_press)
self.SetFocus()
示例8: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(self, bgapp, title):
wx.Frame.__init__(self, None, title=title, pos=(50, 10), size=(1100, 450))
self.bgapp = bgapp
self.spewwait = clock()
self.Bind(wx.EVT_CLOSE, self.OnClose)
self.SetBackgroundColour(wx.Colour(255, 255, 255))
fw = 12
spewList = wx.ListCtrl(self, pos=(0, 0), size=(1000, 300), style=wx.LC_REPORT | wx.LC_HRULES | wx.LC_VRULES)
spewList.InsertColumn(0, 'Optimistic Unchoke', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
spewList.InsertColumn(1, 'Peer ID', width=0)
spewList.InsertColumn(2, 'IP', width=fw * 11)
spewList.InsertColumn(3, 'Local/Remote', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
spewList.InsertColumn(4, 'Up', format=wx.LIST_FORMAT_RIGHT, width=fw * 2)
spewList.InsertColumn(5, 'Interested', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
spewList.InsertColumn(6, 'Choking', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
spewList.InsertColumn(7, 'Down', format=wx.LIST_FORMAT_RIGHT, width=fw * 8)
spewList.InsertColumn(8, 'Interesting', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
spewList.InsertColumn(9, 'Choked', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
spewList.InsertColumn(10, 'Snubbed', format=wx.LIST_FORMAT_CENTER, width=fw * 2)
spewList.InsertColumn(11, 'Downloaded', format=wx.LIST_FORMAT_RIGHT, width=fw * 5)
spewList.InsertColumn(12, 'Uploaded', format=wx.LIST_FORMAT_RIGHT, width=fw * 5)
spewList.InsertColumn(13, 'Completed', format=wx.LIST_FORMAT_RIGHT, width=fw * 6)
spewList.InsertColumn(14, 'Peer Download Speed', format=wx.LIST_FORMAT_RIGHT, width=fw * 10)
spewList.InsertColumn(15, 'Requested Piece', format=wx.LIST_FORMAT_CENTER, width=fw * 6)
spewList.InsertColumn(16, 'Received Piece', format=wx.LIST_FORMAT_CENTER, width=fw * 6)
self.spewList = spewList
labelVOD = wx.StaticText(self, -1, 'static text')
self.labelVOD = labelVOD
gridSizer = wx.FlexGridSizer(cols=1, vgap=5)
gridSizer.Add(spewList, -1, wx.EXPAND)
gridSizer.Add(labelVOD, -1, wx.EXPAND)
self.SetSizer(gridSizer)
self.bgapp.statFrame = self
示例9: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(self, parent, df, status_bar_callback):
wx.ListCtrl.__init__(
self, parent, -1,
style=wx.LC_REPORT | wx.LC_VIRTUAL | wx.LC_HRULES | wx.LC_VRULES | wx.LB_MULTIPLE
)
self.status_bar_callback = status_bar_callback
self.df_orig = df
self.original_columns = self.df_orig.columns[:]
if isinstance(self.original_columns,(pd.RangeIndex,pd.Int64Index)):
# RangeIndex is not supported by self._update_columns
self.original_columns = pd.Index([str(i) for i in self.original_columns])
self.current_columns = self.df_orig.columns[:]
self.sort_by_column = None
self._reset_mask()
# prepare attribute for alternating colors of rows
self.attr_light_blue = wx.ListItemAttr()
self.attr_light_blue.SetBackgroundColour("#D6EBFF")
self.Bind(wx.EVT_LIST_COL_CLICK, self._on_col_click)
self.Bind(wx.EVT_RIGHT_DOWN, self._on_right_click)
self.df = pd.DataFrame({}) # init empty to force initial update
self._update_rows()
self._update_columns(self.original_columns)
示例10: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def __init__(self, *args, **kwds):
# begin wxGlade: DeviceManager.__init__
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE | wx.FRAME_TOOL_WINDOW | wx.STAY_ON_TOP
wx.Frame.__init__(self, *args, **kwds)
self.SetSize((707, 337))
self.devices_list = wx.ListCtrl(self, wx.ID_ANY, style=wx.LC_HRULES | wx.LC_REPORT | wx.LC_VRULES)
self.new_device_button = wx.BitmapButton(self, wx.ID_ANY, icons8_plus_50.GetBitmap())
self.remove_device_button = wx.BitmapButton(self, wx.ID_ANY, icons8_trash_50.GetBitmap())
self.device_properties_button = wx.BitmapButton(self, wx.ID_ANY, icons8_administrative_tools_50.GetBitmap())
self.move_item_up_button = wx.BitmapButton(self, wx.ID_ANY, icons8up.GetBitmap())
self.move_item_down_button = wx.BitmapButton(self, wx.ID_ANY, icons8_down.GetBitmap())
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_LIST_BEGIN_DRAG, self.on_list_drag, self.devices_list)
self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.on_list_item_activated, self.devices_list)
self.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.on_list_right_click, self.devices_list)
self.Bind(wx.EVT_BUTTON, self.on_button_new, self.new_device_button)
self.Bind(wx.EVT_BUTTON, self.on_button_remove, self.remove_device_button)
self.Bind(wx.EVT_BUTTON, self.on_button_properties, self.device_properties_button)
self.Bind(wx.EVT_BUTTON, self.on_button_up, self.move_item_up_button)
self.Bind(wx.EVT_BUTTON, self.on_button_down, self.move_item_down_button)
# end wxGlade
self.Bind(wx.EVT_CLOSE, self.on_close, self)
示例11: create_paths_listctrl
# 需要导入模块: import wx [as 别名]
# 或者: from wx import LC_VRULES [as 别名]
def create_paths_listctrl(self, use_multi_image):
if use_multi_image:
self.paths_listctrl = wx.ListCtrl(self, -1,
size=(-1, -1),
style=wx.LC_REPORT
# | wx.BORDER_SUNKEN
| wx.BORDER_SIMPLE
# | wx.BORDER_STATIC
# | wx.BORDER_THEME
# | wx.BORDER_NONE
# | wx.LC_EDIT_LABELS
| wx.LC_SORT_ASCENDING
# | wx.LC_NO_HEADER
# | wx.LC_VRULES
# | wx.LC_HRULES
# | wx.LC_SINGLE_SEL
)
self.paths_listctrl.InsertColumn(0, 'Display', wx.LIST_FORMAT_RIGHT, width=100)
self.paths_listctrl.InsertColumn(1, 'Source', width=620)
else:
# show simpler listing without header if only one wallpaper target
self.paths_listctrl = wx.ListCtrl(self, -1,
size=(-1, -1),
style=wx.LC_REPORT
# | wx.BORDER_SUNKEN
| wx.BORDER_SIMPLE
# | wx.BORDER_STATIC
# | wx.BORDER_THEME
# | wx.BORDER_NONE
# | wx.LC_EDIT_LABELS
# | wx.LC_SORT_ASCENDING
| wx.LC_NO_HEADER
# | wx.LC_VRULES
# | wx.LC_HRULES
# | wx.LC_SINGLE_SEL
)
self.paths_listctrl.InsertColumn(0, 'Source', width=720)
# Add the item list to the control
self.paths_listctrl.SetImageList(self.il, wx.IMAGE_LIST_SMALL)
self.sizer_paths_list.Add(self.paths_listctrl, 1, wx.CENTER|wx.ALL|wx.EXPAND, 5)