[wxPython-users] How to pass data to a frame

Saketh Bhamidipati saketh.bhamidipati at gmail.com
Fri Jul 14 09:07:02 PDT 2006


On 7/14/06, Alejandro Michelin Salomon ( Adinet ) <alejmsg at adinet.com.uy>
wrote:
>
> I create the menu and menubar.
>
> I have a file that is the main.
> The menu bar call a frame tha has a fin process.
>

What is this "fin" process? I don't understand. Do you mean that the menu
has an item which creates a dialog box, or a child frame? They are two
different things.

After find records, i need call a frame that has a form for the based table.
>
> The problem is that i dont now how to do it.
>
> I now how to call it, but not whith parameters.
>

I would advise you to create a subclass of whatever you are creating. From
your description, I think you are using a wx.Dialog or a wx.Frame as a child
frame. So let's say you're creating a wx.Dialog, you would want to make your
form dialog a subclass of wx.Dialog:

class FormDialog(wx.Dialog):
    def __init__(self, parent, id, title, parameter1, parameter2):
wx.Dialog.__init__(self, parent, id, title)
doSomething(parameter1)
doSomethingElse(parameter2)

    def doSomething(self):
...
    def doSomethingElse(self):
...

It's the same idea for a wx.Frame, although you'd have to change around the
arguments in the __init__ function. I'm not sure if this is what you want,
though.

If you post your code, we can help you more easily. It's hard to understand
your problem without seeing the code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200607=
14/457e01a7/attachment.htm


More information about the wxpython-users mailing list