new purge of radios, first step for coloring correct element
This commit is contained in:
		@@ -4,7 +4,7 @@ from tkinter import font as tkfont
 | 
			
		||||
 | 
			
		||||
DEBUG = True
 | 
			
		||||
 | 
			
		||||
# Acces to Controller
 | 
			
		||||
# Access to Controller
 | 
			
		||||
from neuesquiz_controller import *
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -106,7 +106,12 @@ class Application(tk.Frame):
 | 
			
		||||
 | 
			
		||||
    # TODO: coloring of correct answer in green
 | 
			
		||||
    def mark_correct_answer(self):
 | 
			
		||||
        pass
 | 
			
		||||
        # Was auf grün setzen? -> Element finden
 | 
			
		||||
        for element in self.radios:
 | 
			
		||||
            print("Element finden")
 | 
			
		||||
            print(element.cget('value'))
 | 
			
		||||
            # Ausführen: auf grün setzen. 
 | 
			
		||||
            element['bg'] = "green"
 | 
			
		||||
 | 
			
		||||
    # TODO: coloring of selected answer in red if wrong
 | 
			
		||||
    def mark_answer_incorrect(self):
 | 
			
		||||
@@ -146,8 +151,13 @@ class Application(tk.Frame):
 | 
			
		||||
        
 | 
			
		||||
    def purge_radios(self):
 | 
			
		||||
        for r in self.radios:
 | 
			
		||||
            r.grid_forget()
 | 
			
		||||
            r.destroy()
 | 
			
		||||
 | 
			
		||||
        del(self.radios)
 | 
			
		||||
        self.radios = list()
 | 
			
		||||
            
 | 
			
		||||
 | 
			
		||||
    # TODO: reset of all elements
 | 
			
		||||
    def reset(self):
 | 
			
		||||
        pass
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user