User Profile

Collapse

Profile Sidebar

Collapse
Alex1980
Alex1980
Last Activity: Aug 19 '10, 07:29 AM
Joined: Aug 18 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Alex1980
    replied to update of elements in GUI (TKinter)
    Sorry for this, I actually sorted the way out)

    thnx 2 everyone
    See more | Go to post

    Leave a comment:


  • Alex1980
    replied to update of elements in GUI (TKinter)
    OK thanx a great lot, this actually did work, but there seems to be a bit of a problem: the function [run] is called every time from scratch, i.e. if I update an array (pretty much how a genetic algorithm works) I need to store it for the next iteration to use. Is this somehow doable in this case?

    I see that you start with n=0 and then add an increment every iteration until some condition is fulfilled, so each time [run] is called...
    See more | Go to post

    Leave a comment:


  • Alex1980
    replied to update of elements in GUI (TKinter)
    hey thanks this seems to work...one more question, if u don't maind, what if I'd like to launch this counter at a click of a button? I've tried modifying your code

    Code:
    from Tkinter import *
     
    root = Tk()
    root.geometry('100x50+20+20')
     
    mainframe = Frame(root)
    mainframe.grid(column=1000, row=1000, sticky=(N, W, E, S))
    mainframe.columnconfigure(0, weight=1)
    mainframe.rowconfigure(0, weight=1)
    ...
    See more | Go to post
    Last edited by bvdet; Aug 19 '10, 12:19 AM. Reason: Fixed code tags [code]....[/code]

    Leave a comment:


  • Alex1980
    started a topic update of elements in GUI (TKinter)

    update of elements in GUI (TKinter)

    hi,
    here's the situation: I'm trying to build a GUI for a Genetic Algorithm that has a number of elements (labels) updated every iteration of the run.

    I've tried doing it in the widget (Label) (1) and in the mainframe (2), but neither worked.

    (1)
    Code:
    Label(mainframe.update_idletasks(),textvariable=best,bg='#321000',fg='#000fff000',font=("Helvetica",x1)).grid(column=1,row=1)
    (2)
    Code:
    mainframe =
    ...
    See more | Go to post
No activity results to display
Show More
Working...