本文整理汇总了Python中wx.EVT_LIST_COL_CLICK属性的典型用法代码示例。如果您正苦于以下问题:Python wx.EVT_LIST_COL_CLICK属性的具体用法?Python wx.EVT_LIST_COL_CLICK怎么用?Python wx.EVT_LIST_COL_CLICK使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类wx
的用法示例。
在下文中一共展示了wx.EVT_LIST_COL_CLICK属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DoInsertPage
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_COL_CLICK [as 别名]
def DoInsertPage(self, page, pos):
if not isinstance(page, wx.Window):
page=page(self)
ctl=page.GetControl()
if pos == None:
self.AddPage(ctl, page.name)
self.pages.append(page)
else:
self.InsertPage(pos, ctl, page.name)
self.pages.insert(pos, page)
if isinstance(ctl, wx.ListCtrl):
ctl.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemDoubleClick)
ctl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnItemRightClick)
ctl.Bind(wx.EVT_LIST_COL_CLICK, self.OnColClick)
if wx.Platform == "__WXMSW__":
ctl.Bind(wx.EVT_RIGHT_UP, self.OnItemRightClick)
示例2: CreateControls
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_COL_CLICK [as 别名]
def CreateControls(self):
"""Create our sub-controls"""
wx.EVT_LIST_COL_CLICK(self, self.GetId(), self.OnReorder)
wx.EVT_LIST_ITEM_SELECTED(self, self.GetId(), self.OnNodeSelected)
wx.EVT_MOTION(self, self.OnMouseMove)
wx.EVT_LIST_ITEM_ACTIVATED(self, self.GetId(), self.OnNodeActivated)
self.CreateColumns()
示例3: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_COL_CLICK [as 别名]
def __init__(self, numColumns, preSortCallback = None):
self.SetColumnCount(numColumns)
self.preSortCallback = preSortCallback
list = self.GetListCtrl()
if not list:
raise ValueError, "No wx.ListCtrl available"
list.Bind(wx.EVT_LIST_COL_CLICK, self.__OnColClick, list)
示例4: __init__
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_COL_CLICK [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)
示例5: create_widget
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_COL_CLICK [as 别名]
def create_widget(self):
self.widget = wx.ListCtrl(self.parent_window.widget, self.id, style=self.style)
self._update_widget_properties(modified=None)
self.widget.Bind(wx.EVT_LIST_COL_CLICK, self.on_set_focus)
self.widget.Bind(wx.EVT_LIST_COL_END_DRAG, self._on_grid_col_resize)
示例6: EnableSorting
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_LIST_COL_CLICK [as 别名]
def EnableSorting(self):
"""
Enable automatic sorting when the user clicks on a column title
"""
self.Bind(wx.EVT_LIST_COL_CLICK, self._HandleColumnClick)
# Install sort indicators if they don't already exist
if self.smallImageList is None:
self.SetImageLists()
if (not self.smallImageList.HasName(ObjectListView.NAME_DOWN_IMAGE) and
self.smallImageList.GetSize(0) == (16,16)):
self.RegisterSortIndicators()