EVT_LIST_ITEM_SELECTED not sent when item has a widget inside it

I have an app that uses a UltimateListCtrl, the items in the list have both text and a wxTextCtrl. the item’s are added by clicking a button on the tool bar, however, when i try to click on an item, it doesn’t get selected, I believe this is because the EVT_LIST_ITEM_SELECTED doesn’t get sent. without the wxTextCtrl, it can be selected, attached is my app, it is small, and Mike Driscollis says that it will work for a demo app, it has no dependencies except wxPython

timer.py (2.99 KB)

···


Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I just massacred you!!!

Theres a bug in ultimatelistctrl.py around line 7248. The return needs
to be tabbed over so its inside the if RightDown block. I'll write a
ticket.

        if not self.HasCurrent() or self.IsEmpty():
            if event.RightDown():
                self.SendNotify(-1,
wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition())

                evtCtx = wx.ContextMenuEvent(wx.EVT_CONTEXT_MENU,
self.GetParent().GetId(),

self.ClientToScreen(event.GetPosition()))
                evtCtx.SetEventObject(self.GetParent())

self.GetParent().GetEventHandler().ProcessEvent(evtCtx)

            return

You can find the file inside your python distribution for example in
mine its at:

E:\py26\Lib\site-packages\wx-2.8-msw-unicode\wx\lib\agw

Mark

···

On Jun 17, 4:45 am, Micah Nordland <mpnordl...@gmail.com> wrote:

I have an app that uses a UltimateListCtrl, the items in the list have both
text and a wxTextCtrl. the item's are added by clicking a button on the tool
bar, however, when i try to click on an item, it doesn't get selected, I
believe this is because the EVT_LIST_ITEM_SELECTED doesn't get sent. without
the wxTextCtrl, it can be selected, attached is my app, it is small, and
Mike Driscollis says that it will work for a demo app, it has no
dependencies except wxPython

--
Hi, I will kill all ads in google gmail.
They will all be dead and gone for all my emails to you. HA HA bye bye ads I
just massacred you!!!

timer.py
4KViewDownload

http://trac.wxwidgets.org/ticket/12154

The fix I mentioned is not a final fix and may even break things so
use at your own risk until the ticket is answered.

Mark

···

On Jun 17, 7:23 am, Mark <markree...@gmail.com> wrote:

Theres a bug in ultimatelistctrl.py around line 7248. The return needs
to be tabbed over so its inside the if RightDown block. I'll write a
ticket.

    if not self\.HasCurrent\(\) or self\.IsEmpty\(\):
        if event\.RightDown\(\):
            self\.SendNotify\(\-1,

wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition())

            evtCtx = wx\.ContextMenuEvent\(wx\.EVT\_CONTEXT\_MENU,

self.GetParent().GetId(),

self.ClientToScreen(event.GetPosition()))
evtCtx.SetEventObject(self.GetParent())

self.GetParent().GetEventHandler().ProcessEvent(evtCtx)

        return

You can find the file inside your python distribution for example in
mine its at:

E:\py26\Lib\site-packages\wx-2.8-msw-unicode\wx\lib\agw

Mark

On Jun 17, 4:45 am, Micah Nordland <mpnordl...@gmail.com> wrote:

> I have an app that uses a UltimateListCtrl, the items in the list have both
> text and a wxTextCtrl. the item's are added by clicking a button on the tool
> bar, however, when i try to click on an item, it doesn't get selected, I
> believe this is because the EVT_LIST_ITEM_SELECTED doesn't get sent. without
> the wxTextCtrl, it can be selected, attached is my app, it is small, and
> Mike Driscollis says that it will work for a demo app, it has no
> dependencies except wxPython

> --
> Hi, I will kill all ads in google gmail.
> They will all be dead and gone for all my emails to you. HA HA bye bye ads I
> just massacred you!!!

> timer.py
> 4KViewDownload

oh, thank you, I was getting frustrated, as nothing i tried worked

···

On Jun 16, 7:35 pm, Mark <markree...@gmail.com> wrote:

wxTrac has been migrated to GitHub Issues - wxWidgets

The fix I mentioned is not a final fix and may even break things so
use at your own risk until the ticket is answered.

Mark

On Jun 17, 7:23 am, Mark <markree...@gmail.com> wrote:

> Theres a bug in ultimatelistctrl.py around line 7248. The return needs
> to be tabbed over so its inside the if RightDown block. I'll write a
> ticket.

> if not self.HasCurrent() or self.IsEmpty():
> if event.RightDown():
> self.SendNotify(-1,
> wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition())

> evtCtx = wx.ContextMenuEvent(wx.EVT_CONTEXT_MENU,
> self.GetParent().GetId(),

> self.ClientToScreen(event.GetPosition()))
> evtCtx.SetEventObject(self.GetParent())

> self.GetParent().GetEventHandler().ProcessEvent(evtCtx)

> return

> You can find the file inside your python distribution for example in
> mine its at:

> E:\py26\Lib\site-packages\wx-2.8-msw-unicode\wx\lib\agw

> Mark

> On Jun 17, 4:45 am, Micah Nordland <mpnordl...@gmail.com> wrote:

> > I have an app that uses a UltimateListCtrl, the items in the list have both
> > text and a wxTextCtrl. the item's are added by clicking a button on the tool
> > bar, however, when i try to click on an item, it doesn't get selected, I
> > believe this is because the EVT_LIST_ITEM_SELECTED doesn't get sent. without
> > the wxTextCtrl, it can be selected, attached is my app, it is small, and
> > Mike Driscollis says that it will work for a demo app, it has no
> > dependencies except wxPython

> > --
> > Hi, I will kill all ads in google gmail.
> > They will all be dead and gone for all my emails to you. HA HA bye bye ads I
> > just massacred you!!!

> > timer.py
> > 4KViewDownload