User Profile

Collapse

Profile Sidebar

Collapse
Daniel M
Daniel M
Last Activity: Feb 26 '12, 06:39 AM
Joined: Feb 15 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Daniel M
    replied to Matplotlib show/draw works only once
    This is all inside the command function for a button. I don't close the GUI, I just close the plot window. And then when I try to bring it back up by pressing the button, I get a blank graph. The repeated r.get() calls is a mistake. The whole function (as I am currently testing it) is:

    Code:
    def ParOpt(self):
            Ready = (self.r.get() != '') and (self.rp.get() != '') and (self.th.get() != '')
            Ready = Ready and
    ...
    See more | Go to post

    Leave a comment:


  • Daniel M
    started a topic Matplotlib show/draw works only once

    Matplotlib show/draw works only once

    I am writing a GUI program in Tkinter which allows the user to enter in different parameters specifying an ellipse segment. Then, he/she presses a button and the ellipse segment is plotted, using matplotlib. Here is the code (inside a class, but logically stands alone) that does this:

    Code:
    aa = DataArray(self.file0)  #Retrieve data sets
    bb = DataArray(self.file1)  #Not used right now
    cc = DataArray(self.file2)
    ...
    See more | Go to post

  • Big thanks bvdet. This is the part that I ended up using:

    Code:
    top = Toplevel()
    top.title("Adjust Ellipse")
    top.protocol("WM_DELETE_WINDOW", self.exit)
    
    self.master = master
    master.withdraw()
    Along with the method:

    Code:
    def exit(self):
        self.master.deiconify()
        self.master.destroy() #Exit all when 'top' is closed
    ...
    See more | Go to post

    Leave a comment:


  • How to close "Tk" Window without closing whole GUI

    Hi, I am writing a program, in which everything interesting happens in a Toplevel window that I have made. However, whenever I run the program, I get both the standard Tk window and the Toplevel window that I made. How do I get rid of the first Tk window, without closing out of the program completely?

    Thanks

    Code:
    #Merthe's Ellipse Adjustment Program February 2012
    
    import numpy
    import scipy
    ...
    See more | Go to post

  • Oh, wow, that totally worked. Yeah, I plan to store the file names, but I was just testing it. I still don't understand why the parenthesis would cause the call to the button commands immediately and then never again. Anyways, thanks a lot!
    See more | Go to post

    Leave a comment:


  • Tkinter Button Commands are Called Only at Startup?

    I am trying to use Tkinter to build a simple GUI app which imports data and performs some analysis. The GUI has just four labels and four buttons side by side. When you press the button, you should get a File Dialog prompt. However, whenever I run the script (see below), Python calls all button commands at startup, and then the buttons don't work afterwards. Even if I write the code without a class, the same thing happens. How do I get it to stop...
    See more | Go to post

  • Daniel M
    started a topic tkFileDialog with tKinter

    tkFileDialog with tKinter

    I am trying to make a simple app to select and operate on data. I am using Tkinter to build a GUI with four labels and four buttons, side by side. However, for some reason when I run the script, all the button commands get called, asking the user to select all files upon startup, and then afterwards the buttons do not work. Here's my code:
    ---
    Code:
    import numpy
    import scipy
    
    from Tkinter import *
    import tkFileDialog
    ...
    See more | Go to post
    Last edited by bvdet; Feb 15 '12, 07:14 PM. Reason: Ad code tags
No activity results to display
Show More
Working...