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


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to