add method init_and_report and label_empty to Class ShowAddress

This commit is contained in:
2024-08-23 12:57:07 +02:00
parent 101a2167b6
commit c87ba4493d
3 changed files with 33 additions and 26 deletions

View File

@ -74,7 +74,7 @@ class ConToDict:
for items in dictlist:
if items == '=':
dictlist.remove(items)
for i in dictlist: # Here is the beginning (Loop) of convert List to Dictionary
for i in dictlist: # Here is the beginning (Loop) of convert List to Dictionary
a = [dictlist[0], dictlist[1]]
b = [dictlist[2], dictlist[3]]
c = [dictlist[4], dictlist[5]]
@ -118,6 +118,20 @@ class ShowAddress(tk.Tk):
self.DNS = None
self.add = None
def init_and_report(self, data=None):
# Address Label
self.add = tk.StringVar()
self.add.set('Address: ' + data[0])
self.DNS = tk.StringVar()
self.DNS.set(' DNS: ' + data[1])
self.enp = tk.StringVar()
self.enp.set('Endpoint: ' + data[2])
def label_empty(self):
self.add.set('')
self.DNS.set('')
self.enp.set('')
def show_data(self):
# Address Label
self.address = tk.Label(self.lb_frame, textvariable=self.add, fg='blue')