title: How do i get information from a slider using button in wxpython?
body: <p>I get the following error AttributeError: 'Button' object has no attribute 'GetValue'
  I'm running Python 3.9.13</p>
  <pre><code>import wx
  import os
  style = wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER
  class main(wx.Frame) :
      def __init__(self,parent,id) :
          wx.Frame.__init__(self,parent,id,&quot;Slider&quot;, size=(500,300),style=style)
          panel=wx.Panel(self)
          button=wx.Button(panel,label=&quot;Work!&quot;, pos=(90,90), size=(100,100))
          slider= wx.Slider(panel, value=1, minValue=1, maxValue=255, style= wx.SL_HORIZONTAL | wx.SL_LABELS, pos=(200,90), size=(250,60))
          self.Bind(wx.EVT_BUTTON, self.val, button,slider)
          self.Bind(wx.EVT_CLOSE, self.closewindow)
          self.Center() 
      def val(self,event):
          obj = event.GetEventObject() 
          val = obj.GetValue() 
          print(val)
      def closewindow(self,windows):
          self.Destroy()
  
  
  
  if __name__=='__main__':
      app=wx.PySimpleApp()
      frame=main(parent=None,id=1)
      frame.Show()
      app.MainLoop()
  </code></pre>