Hello everybody!!!
( Here is a tough one.... )
I made an app for a dance studio using wxPython. In order to save space in a certain "screen"
of my app , i use combo-boxes or choice-boxes ( in order to show the present students in each group lesson that took place that day ).
I have managed to create these widgets ( according to how many group lessons took place that day ( for example 2 lessons > 2 combo-boxes) ) , but i cannot
"destroy" them when i refresh the screen by choosing another date....
The progress i made so far is that i understand that each widget has an ID which
somehow i can retreive , but how can i make the app understand that i want to destroy the widgets that have these ID's?
Here is the part which creates the widgets ( in the future i will make a special Class for these... )
Any guidelines will be very welcomed!!!!
Thank you all in advance!!
Elias
( Here is a tough one.... )
I made an app for a dance studio using wxPython. In order to save space in a certain "screen"
of my app , i use combo-boxes or choice-boxes ( in order to show the present students in each group lesson that took place that day ).
I have managed to create these widgets ( according to how many group lessons took place that day ( for example 2 lessons > 2 combo-boxes) ) , but i cannot
"destroy" them when i refresh the screen by choosing another date....
The progress i made so far is that i understand that each widget has an ID which
somehow i can retreive , but how can i make the app understand that i want to destroy the widgets that have these ID's?
Here is the part which creates the widgets ( in the future i will make a special Class for these... )
Code:
Group_Lessons_That_Day=MyConnection("""SELECT GroupLessonType,StudentsCodes FROM grouplessons WHERE Date='%s' order by Time """ % Form)
increment=0
for Lesson in Group_Lessons_That_Day:
Choices=[]
Choices.append(Lesson[0])
for id in Lesson[1].strip(",").split(","):
id=int(id.strip("[]"))
Students_Name=MyConnection("""SELECT StudentName FROM students WHERE StudentCode='%s' """ % id)[0][0].split()[0]
Choices.append(Students_Name)
self.Lesson_List=wx.Choice(choices=Choices,id=increment+3000, parent=self,pos=wx.Point(20+increment, 462), size=wx.Size(120, 21), style=0)
self.Lesson_List.SetSelection(0)
increment+=125
Thank you all in advance!!
Elias
Comment