#๐ customtkinter scrollableframe help
14 messages ยท Page 1 of 1 (latest)
@sage dirge
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
def submit(self):
global list_data
list_data+=1
global spaces
if len(self.entry.get())<=20:
spaces_to_add = 20-len(self.entry.get())
int(spaces_to_add)
for i in range(spaces_to_add):
spaces=spaces+" "
list_grades.append(self.optionmenu_1.get())
list_weights.append(self.optionmenu_2.get())
if self.entry.get() in list_names:
if askyesno("Duplicate course", "The course '"+self.entry.get()+"' already exists in your list of submitted data. Are you sure you wish to add it again?") == True:
list_names.append(self.entry.get())
print("yes")
self.listbox.insert(list_data," "+self.entry.get()+spaces+" "+"\t"+self.optionmenu_1.get()+"\t"+self.optionmenu_2.get())
else:
print("no")
#pass
else:
list_names.append(self.entry.get())
self.listbox.insert(list_data," "+self.entry.get()+spaces+" "+"\t"+self.optionmenu_1.get()+" "+"\t"+self.optionmenu_2.get())
print(len(self.entry.get()))
spaces=""```
that is my submit function which adds it into the listbox
hello
each of those values is in a separate list
so
list_names = ["Math", "English", "History"]
list_grades = ["A+", "A+", "B"]
list_weights = ["Regular (1)", "AP", "Regular (2)"]
and i'm trying to make it so that when prompted "Do you want to add this grade to your transcript?" and if the answer is True, then it'll add each value to a new list and then be inserted into the scrollableframe of classes + info
so
transcript_info = ["Math A+ Regular (1)", "English A+ AP", "History B Regular (2)"]
this is what i have currently, it's not giving me an error but it's not sending it into the scrollableframe
if askyesno("Transcript", "Would you like to send this grade to your transcript?") == True:
#transcriptdata = list_data," "+self.entry.get()+spaces+" "+"\t"+self.optionmenu_1.get()+" "+"\t"+self.optionmenu_2.get()
t=0
for t in range(list_data):
transcript_info = list_names[t]+list_grades[t]+list_weights[t]
self.scrollable_frame_data.append(transcript_info)
print(transcript_info)```
hi, i put info on what i'm trying to do, if you need clarification on anything, lmk, thanks!
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.