gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] wxEvents question


From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] wxEvents question
Date: Sat, 1 May 2004 10:43:43 +0200
User-agent: KMail/1.6.1

On Friday 30 April 2004 08:38, Karsten Hilbert wrote:
> > I would like to extend the functionality of gmPhrasewheel in a way that
> > when an item has been selected certain actions are initiated.
> >
> > Therefore I looked at the wx event handling and I am totally lost.
> > One is supposed to define an custom event. I did this as described on
> > this page:
> > http://wiki.wxpython.org/index.cgi/CustomEventClasses
>
> Nah, that's way too big a solution.
>
> > but I am not sure where to add the code. Here is what I did.
>
> It entirely depends on what you want to do. If you want to
> update other widgets upon selection you can simply use the
> addCallback() API. If, however, you want to shift focus upon
> <enter> you probably need to do something else, like
> processing the ENTER event directly or hooking up the
> loose_focus event.
>
> Karsten
Well, now that I found out that there is an addCallback() API
I used it. Around line 300 of gmPhraseWheel it returns self.data which as as 
far as I can tell is a pointer to the data I want.
You use wxListBox.GetClientData() to get the pointer. 

Well back in gmLabJournal the callback provides me with this very pointer.
How do I get the data associated with it ?

Sebastian 

-- 
Sebastian Hilbert 
Leipzig / Germany
[www.openmed.org] -> PGP welcome, HTML ->/dev/null
ICQ: 86 07 67 86   -> No files, no URL's
My OS: Suse Linux. Geek by Nature, Linux by Choice

Unterstützen Sie die Entwicklung von Gnumed durch Ihren
        Internet - Einkauf unter der Adresse:
http://profiseller.de/shop1/index.php3?ps_id=P1658133




reply via email to

[Prev in Thread] Current Thread [Next in Thread]