Re: How to create my own wx.TreeCtrl events?

Matt Kimberling <[email protected]>
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
That was indeed the problem.  I am able to create the event after using the 
expected Id.

Thanks,
 Matt

On Sunday, July 12, 2020 at 10:54:58 AM UTC-7, Matt Kimberling wrote:
>
> Hello,
>
> I would like to manually create a wxEVT_TREE_STATE_IMAGE_CLICK event for 
> my wx.TreeCtrl. 
>
>
> When I try to create the event:
>
> event = wx.TreeEvent( wx.wxEVT_TREE_STATE_IMAGE_CLICK, treeCtrl, treeCtrl
> .GetId() )
>
> I get an exception 
>
> TypeError: TreeEvent(): arguments did not match any overloaded call:
>
>   overload 1: argument 3 has unexpected type 'int'
>
>   overload 2: argument 1 has unexpected type 'int'
>
>
>
> I've been looking at the docs & source code today and haven't been able to 
> figure out how to do this.  I have noticed that the event received by my 
> application is actually wx._core.TreeEvent.  I get similar errors trying to 
> create an instance of that.  I tried manually printing the arguments for 
> wx.TreeEvent.__init__ with inspect.formatargspec but there's something 
> about overloaded functions that prevents that from working here.
>
> Any advice is appreciated!
>
> -Matt
>

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/187ca96b-ae19-448d-9045-9ccfe90510f8o%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.