GNU Radio python help

Hi
I am not a great programmer but I have been playing around with the GNU
Radio FFT Sink to do a few things and one thing I am trying to do is be
able to click on a signal of interest and have the radio tune to that
frequency. I have added a function “on_mouse_left” to
“grid_plotter_base.py” (based on existing code tnx) which returns the
frequency. What I can’t figure out is how I pass this to the top_block
to update the freq variable or even if it’s possible.
Thanks

#mouse left click event
def on_mouse_left(event):
  x, y = self._point_label_coordinate
  if x < self.padding_left or x > self.width-self.padding_right:

return
if y < self.padding_top or y > self.height-self.padding_bottom:
return
#scale to window bounds
x_win_scalar = float(x -
self.padding_left)/(self.width-self.padding_left-self.padding_right)
#scale to grid bounds
freqw = int(x_win_scalar*(self.x_max-self.x_min) + self.x_min)
print freqw
top_block.set_freq(freqw)
self.Bind(wx.EVT_LEFT_DOWN, on_mouse_left)