Sorry for this, I actually sorted the way out)
thnx 2 everyone
User Profile
Collapse
-
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...Leave a comment:
-
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)
Leave a comment:
-
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)
Code:mainframe =
No activity results to display
Show More
Leave a comment: