wx.EVT_LIST_COL_DRAGGING problem

Still thinking workaround, why not sink OnMouseMove for now?

···

-----Original Message-----
From: Rickey, Kyle W [mailto:Kyle.Rickey@bakerhughes.com]
Sent: Wednesday, January 09, 2008 5:38 PM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] wx.EVT_LIST_COL_DRAGGING problem

I've got no problem capturing wx.EVT_LIST_COL_BEGIN_DRAG and
wx.EVT_LIST_COL_END_DRAG, but I need the event that is continuously sent
while dragging.

Aaron,
  I binding to wx.EVT_MOUSE_EVENTS onece the drag has started, however,
the dragging event still does not fire while dragging. I also tested my
previous code out (using mylist.Bind(wx.EVT_LIST_COL_DRAGGING,
self.OnColDragging)) last night on my Ubuntu 7.10 machine with python
2.5 and wxpython 2.8.7.1 and the event is being sent correctly.

import wx

class Main(wx.Frame):
  def __init__(self, parent, id, title):
    wx.Frame.__init__(self, parent, -1, title)
    
    self.mylist = wx.ListCtrl(self, -1, style=wx.LC_REPORT)
    self.mylist.InsertColumn(0, "Column 0")
    self.mylist.InsertColumn(1, "Column 1")
    self.mylist.InsertColumn(2, "Column 2")
    
    #self.mylist.Bind(wx.EVT_LIST_COL_DRAGGING,
self.OnColDragging)
    self.mylist.Bind(wx.EVT_LIST_COL_BEGIN_DRAG,
self.OnBeginDrag)
    self.mylist.Bind(wx.EVT_LIST_COL_END_DRAG,
self.OnEndDrag)
    
    sizer = wx.BoxSizer()
    sizer.Add(self.mylist, 1, wx.EXPAND)
    self.SetSizer(sizer)
    
    self.Center()
    self.Show()
  
  def OnColDragging(self, event):
    print "I'm being dragged"
  def OnBeginDrag(self, event):
    print "Begin drag"
    self.mylist.Bind(wx.EVT_MOUSE_EVENTS,
self.OnColDragging)
  def OnEndDrag(self, event):
    print "end drag"
    self.mylist.Bind(wx.EVT_MOUSE_EVENTS, None)
    
app = wx.App()
frame = Main(None, -1, "Test Column Dragging")
app.MainLoop()

-Kyle Rickey

···

-----Original Message-----
From: Aaron Brady [mailto:castironpi@comcast.net]
Sent: Wednesday, January 09, 2008 5:41 PM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] wx.EVT_LIST_COL_DRAGGING problem

-----Original Message-----
From: Rickey, Kyle W [mailto:Kyle.Rickey@bakerhughes.com]
Sent: Wednesday, January 09, 2008 5:38 PM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] wx.EVT_LIST_COL_DRAGGING problem

I've got no problem capturing wx.EVT_LIST_COL_BEGIN_DRAG and
wx.EVT_LIST_COL_END_DRAG, but I need the event that is continuously

sent

while dragging.

Still thinking workaround, why not sink OnMouseMove for now?

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

This is extremely serious; take two of those and call a doctor. What is a
dirty, dirty hack?

import wx
import time
import threading

class Main(wx.Frame):
  def __init__(self, parent, id, title):
    wx.Frame.__init__(self, parent, -1, title)
    
    self.mylist = wx.ListCtrl(self, -1, style=wx.LC_REPORT)
    self.mylist.InsertColumn(0, "Column 0")
    self.mylist.InsertColumn(1, "Column 1")
    self.mylist.InsertColumn(2, "Column 2")
    
    self.stillextremelyhacky= False
    self.origlabel= title
    self.hackthread= None
    self.mylist.Bind(wx.EVT_LIST_COL_BEGIN_DRAG,
self.OnBeginDrag)
    self.mylist.Bind(wx.EVT_LIST_COL_END_DRAG, self.OnEndDrag)
    
    sizer = wx.BoxSizer()
    sizer.Add(self.mylist, 1, wx.EXPAND)
    self.SetSizer(sizer)
    
    self.Center()
    self.Show()
  
  def OnBeginDrag(self, event):
    print "Begin drag"
    self.stillextremelyhacky= True
    self.hackthread= threading.Thread( target= self.DraggingHack
)
    self.hackthread.start()
  def OnEndDrag(self, event):
    self.stillextremelyhacky= False
    self.hackthread.join()
    self.hackthread= None
    print "end drag"
  def DraggingHack( self ):
    while self.stillextremelyhacky:
      print 'me too %.02f'% time.clock()
      newlabel= '%s %.02f'% ( self.origlabel, time.clock()
)
      wx.CallAfter( self.SetLabel, newlabel )
      #time.sleep(.01) #optional
    
app = wx.PySimpleApp()
frame = Main(None, -1, "Test Column Dragging")
app.MainLoop()

···

-----Original Message-----
From: Rickey, Kyle W [mailto:Kyle.Rickey@bakerhughes.com]
Sent: Thursday, January 10, 2008 8:32 AM

the dragging event still does not fire while dragging. I also tested my

Hi,

How to add an event to wx.Aui.Notebook like
wxEVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU in FlatNotebook?

Cheers
Vincent Jaulin

Robin Dunn a écrit :

Hi,

How to add an event to wx.Aui.Notebook like
wxEVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU in FlatNotebook?

There isn't anything like that currently, you can create a feature request for it.

I would like to have wx.Aui.Notebook control with the same features that wx.lib.flatnotebook control.
wx.EVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU event fired when a menu pops-up in a tab.
The goal is to replace wx.lib.flatnotebook by wx.Aui.Notebook control in my application.

I would like so to add buttons close to wx.AUI_BUTTON_WINDOWLIST button in the wx.Aui.Notebook control.

Cheers
Vincent Jaulin

···

webmaster@keyphrene.com wrote:

webmaster@keyphrene.com wrote:

Robin Dunn a écrit :

Hi,

How to add an event to wx.Aui.Notebook like
wxEVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU in FlatNotebook?

There isn't anything like that currently, you can create a feature request for it.

I would like to have wx.Aui.Notebook control with the same features that wx.lib.flatnotebook control.
wx.EVT_FLATNOTEBOOK_PAGE_CONTEXT_MENU event fired when a menu pops-up in a tab.
The goal is to replace wx.lib.flatnotebook by wx.Aui.Notebook control in my application.

I would like so to add buttons close to wx.AUI_BUTTON_WINDOWLIST button in the wx.Aui.Notebook control.

Feature requests go here: wxWidgets download | SourceForge.net

···

webmaster@keyphrene.com wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!