Tkinter function variable passing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • arvind

    #1

    Tkinter function variable passing

    How to pass the variables defined inside the function to the another
    function on click event of the button in Tkinter?
    pleas send me a sample code if anybody has it.
    thanx

  • Fredrik Lundh

    #2
    Re: Tkinter function variable passing

    arvind wrote:
    How to pass the variables defined inside the function to the another
    function on click event of the button in Tkinter?
    def the_function(ma ster):

    variable = ...

    def callback():
    print variable

    b = Button(master, command=callbac k)

    </F>

    Comment

    • arvind

      #3
      Re: Tkinter function variable passing

      Hi
      thanx for replynig.
      but functios are independent
      and the button is inside one of the functions.
      will u please reshape ur code and send it to me?
      thank u.
      Fredrik Lundh wrote:
      arvind wrote:
      >
      How to pass the variables defined inside the function to the another
      function on click event of the button in Tkinter?
      >
      def the_function(ma ster):
      >
      variable = ...
      >
      def callback():
      print variable
      >
      b = Button(master, command=callbac k)
      >
      </F>

      Comment

      • Fredrik Lundh

        #4
        Re: Tkinter function variable passing

        "arvind" <arvind.mulay@g mail.comwrote:
        thanx for replynig.
        but functios are independent
        and the button is inside one of the functions.
        will u please reshape ur code and send it to me?
        where do I send the invoice ?

        </F>



        Comment

        • arvind

          #5
          Re: Tkinter function variable passing

          please send it to- arvind.mulay@gm ail.com.


          Fredrik Lundh wrote:
          "arvind" <arvind.mulay@g mail.comwrote:
          >
          thanx for replynig.
          but functios are independent
          and the button is inside one of the functions.
          will u please reshape ur code and send it to me?
          >
          where do I send the invoice ?
          >
          </F>

          Comment

          Working...