Python wx.EVT_LIST_COL_CLICK Examples
The following are 6
code examples of wx.EVT_LIST_COL_CLICK().
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: notebook.py From admin4 with Apache License 2.0 | 6 votes |
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)
Example #2
Source File: listviews.py From pyFileFixity with MIT License | 5 votes |
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()
Example #3
Source File: listmixin.py From PandasDataFrameGUI with MIT License | 5 votes |
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)
Example #4
Source File: dfgui.py From PandasDataFrameGUI with MIT License | 5 votes |
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)
Example #5
Source File: list_ctrl.py From wxGlade with MIT License | 5 votes |
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)
Example #6
Source File: ObjectListView.py From bookhub with MIT License | 5 votes |
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()