discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] trying to add a button...


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] trying to add a button...
Date: Tue, 10 May 2005 15:28:07 -0700
User-agent: Mutt/1.5.6i

On Tue, May 10, 2005 at 10:45:03PM +0100, mjam01 wrote:
> Hi guys,
> 
> I'm trying to add a button to the tvrx_wfm_rcv_gui.py code with the
> following placed under the vbox sliders:
> 
> 
> button_freq_up = wx.Button(self, panel, 'FREQ UP')
> vbox.Add(button_freq_up, 0, wx.ALL | wx.EXPAND, 5)
> self.Bind(wx.EVT_BUTTON, self.set_freq_up, button_freq_up)
> 
> 
> I get this error saying a pointer is expected and it's stumped me. Any 
> ideas??!!

>From http://www.wxpython.org/docs/api/wx.Button-class.html

> Button __init__(self, parent, id, label, pos, size, style, validator, name)

The first arg should be the button's parent, probably panel
The second arg should be the button id, e.g., wx.NewId()
The third arg should be the button label

Try this:

  button_freq_up = wx.Button(panel, 1000, 'FREQ UP')

I'm not sure what kind of object self is in your code, but it might be
a gr.flow_graph(), which of course the wx code has no use for ;-)

See scopesink.py for examples of button creation, or the wxpython demos.

Eric




reply via email to

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