当前位置: 首页>>代码示例>>Python>>正文


Python wx.EVT_LIST_COL_CLICK属性代码示例

本文整理汇总了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) 
开发者ID:andreas-p,项目名称:admin4,代码行数:19,代码来源:notebook.py

示例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() 
开发者ID:lrq3000,项目名称:pyFileFixity,代码行数:9,代码来源:listviews.py

示例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) 
开发者ID:bluenote10,项目名称:PandasDataFrameGUI,代码行数:9,代码来源:listmixin.py

示例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) 
开发者ID:bluenote10,项目名称:PandasDataFrameGUI,代码行数:30,代码来源:dfgui.py

示例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) 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:7,代码来源:list_ctrl.py

示例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() 
开发者ID:JackonYang,项目名称:bookhub,代码行数:14,代码来源:ObjectListView.py


注:本文中的wx.EVT_LIST_COL_CLICK属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。