[Top][All Lists]

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

Re: [Gnumed-devel] guibroker

From: Sebastian Hilbert
Subject: Re: [Gnumed-devel] guibroker
Date: Fri, 16 Jan 2004 16:22:12 +0100
User-agent: KMail/1.5.4

Hi !

This was what I was looking for. Took me a while to figure it out but the code 
helped a lot. Works great.

I added a function 
def RaiseAnyPlugin(aPlugin):  to

I guess Karsten will change the code I wrote quite a bit but now it is 
possible to call any(?) registered plugin.
Changes have not been checked into CVS yet.

Keep hacking,

BTW. Anybody else still working on gnumed ? CVS traffic is hardly noticeable 

On Tuesday 13 January 2004 03:24, Ian Haywood wrote:
> On Sat, Jan 10, 2004 at 06:44:13PM +0100, Sebastian Hilbert wrote:
> > Hi !
> >
> > I started to work on GNUmed Archive again and encountered some
> > difficulties.
> >
> > Could someone please demonstrate this with some code snippets since I
> > don't know how to go about this.
> As your title suggests, you need a guibroker
> gb = GuiBroker ()
> gb['main.notebook'] is the wxNotebook object of the main window
> gb['main.notebook.plugins'] = a list of the plugin objects, in order as
> they appear on the notebook
> so for a plugin to find its own position on the notebook
> nbns =['main.notebook.plugins']
> nb_no = nbns.index (self)
> then to force the notebook to display:
>['main.notebook'].SetSelection (nb_no)
> a convience function is defined in wxNotebookPlugin:
> def Raise (self):
>               nbns =['main.notebook.plugins']
>               nb_no = nbns.index (self)
>               self.nb.SetSelection (nb_no)
>               self.tb_main.ShowBar(self.internal_name())
> to raise *another* plugin is a bit harder. All toplevel plugins
> are registered in gb['modules.gui'] as a dictionary by name
> (the class name AFAIK), you
> can then use this instance to find the number by nbns.index ()
> Hope this helps,
> Ian Haywood

reply via email to

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